Arduino frequency measurement to 2 or 3 decimal places
The problem is that the code is counting how many pulses happen during the measurement period. If you measure for 1 second, you have 1 Hz resolution. For 0.1 Hz or 0.01 Hz resolutions you need to measure for 10 or 100 seconds.

The other way to calculate this is how much time it takes between pulses, or between 100 or some other amount of pulses. The MCU has a 16 MHz clock, so in theory you can have up to 62.5 ns resolution. Depending on what hardware support you can use to help with the timing measurement (timer capture, external irq, or none) you could maybe expect better than 10 microsecond resolution.

Be aware that while you can count time in units of 16 MHz clock ticks for precision, the clock is not accurate, as it won't tick at exactly 16000000 Hz. The MCU uses a ceramic resonator for generating the clock, so it is only expected to have about 0.5% tolerance.