Adding delay using counters in arduino mega

For more precise results study the source code of delayMicroseconds().

Your code can not work for a couple of reasons. E.g. ISR takes too long, ignoring function call and housekeeping time, no atomic access...