count and send pulses simultaneously

See the example sketch, Blink without delay.