Which MCU your using ...??
counter contain the no. of pulses which are coming from external world.
you have to take a count of pulses per second means how many pulses are coming every second .. its too simple .. Frequency =1/Time
Frequency In HZ time In sec...
Connect you input signal to interrupt, configure any timer in counter mode.. in the ISR of the interrupt note the value of the counter...
according to the ticks and calculations of timer/counter.. you can know the frequency..