Edgetriggered pulse counter

How long is a pulse? What's the time between pulses?

Will pulseIn() help?