Looking for a better frequency counter library

I've done a couple of frequency counters here:

They aren't exactly libraries, but the ideas there should get you started. You can be doing other stuff while the frequency is counted as the counting is done by the hardware counters/timers.