If you are measuring such a low frequency, it pays to use an interrupt + timer: use a free-running timer that overflows to a counter. Poll the pin connected to the input pin on the rising edge (or falling edge), at beginning of the measurement.
On the first rising edge, zero the counter. On the n'th rising edge, stop the timer and the external interrupt. The reading of counter::TCNTx would be the number of ticks it has taken over n cycles -> you get the frequency / mph.