Arduino uno counter 0 and 2 with external pulses

Hopefully, this will help: