How do you measure frequency using a microcontroller?
You can use a timer capture to detect edges. If the selected edge of the signal occurs the timer value will be latched and the controller will get an interrupt. Read and store the timer value and wait for the next interrupt. Read the new timer value and subtract the previous one. You now have the signal's period. Calculate 1/period to find frequency.  

Notes:  


  
  I'm assuming that you have a decent digital signal  
  You'll have to take the timer's overflow(s) into account  
  Also make sure that the timer is clocked by an appropriate clock