count and send pulses simultaneously

If you want to be able to do something while delaying, do not use delay(...) or delayMicroseconds(...). Learn to use millis() and micros().

At the top of this forum is a tutorial on how to use millis(). The same principles apply for using micros().