High frequency measuring

There is a library:
http://interface.khm.de/index.php/lab/experiments/arduino-frequency-counter-library/