Detecting the frequencies of signals reliably is something that occurs fairly often in projects from guitar tuners to heart rate monitors, but reliable techniques to achieve this are often beyond the casual hobbiest because they involve digital signal processing.
I’m not saying it’s difficult. It’s not difficult. It’s just that you’d need to have studied DSP to know about frequency estimation techniques and the various tradeoffs to select the right one for your application, and many hobbyists haven’t studied DSP.
Here’s a project on using Autocorrelation to detect the frequecy of a signal. It works in noisy environments and is suitable for many hobby projects.