Your approach is basically a reciprocal counter and it can work, if you start and stop the timer in the isr. The logic is essentially this:
If timer is on stop the timer and save the timer count. Else initialize the timer and start counting.
For counting a wide range of frequencies, you may need to consider timer over flow.
Edit: any solution that reads a multi byte counter while it is running will produce the wrong results. Google atomicity to understand why.