Frequency counter, basic version