You rectify sine wave signal, full bridge rectifier, right? It can be done with only four diodes. The sine wave will become a steamed bun wave after passing through the rectifier bridge, that is, the negative periodic waveform of the original sine wave will be moved to it, like a row of steamed buns put together. This waveform is twice the frequency of the original sine wave. At this time, if you use hysteresis comparator to shape, it is equivalent to counting sine voltage twice in a cycle, and you will achieve your goal.
The diode can be 1N58 19, which is a very common fast recovery diode and easy to buy. If the rectifier bridge can't be built, there are many drawings about it on the internet, that is, four diodes are tied together, which is very simple.
This is clear enough.