I am trying to figure out how to count the number of pulses per second from a digital input. Having trouble wrapping my head around the timer function and its implementation on the mega board. Forgive the noob question. Any insight is greatly appreciated.

I am trying to figure out how to count the number of pulses per second from a digital input. Having trouble wrapping my head around the timer function and its implementation on the mega board. Forgive the noob question. Any insight is greatly appreciated.