Is this work for frequency counter

Upfront caveat: I'm not much use with analogue!

However, could you use the analogue comparator, rather than the ADC?
Other than that, half-wave rectification and some squaring of the edges?
(you may also need a DC offset - difficult to tell from the oscilloscope trace)