How to read frequency with Arduino

PulseIn will help you.