Nowadays I would just use a microcontroller. The have integrated timers and counters which make it easy to do something like:
- count the number of transitions made in a certain time period (like 1ms) on an input pin
- if that count is within a certain range set an output pin to HIGH else set it to LOW.
- repeat
This Atmel/Microchip application note describes how to do it with the AVR family of microcontrollers, but it'll be pretty much the same for other mcus.
The components involved can be as simple as the microcontroller plus some input conditioning circuitry. No external crystal is needed if you can live with a 1% error in your timebase.
The only thing left to do is to design some input conditioning so that your signal is detected and your input pin is protected.
Without knowing more about what kind of input signal you want to detect I would just adapt some designs found in other simple frequency counter designs, most notably from the "50 MHz PIC-based Frequency Counter" originally designed by Woldgang Büscher, DL4YHF and copied extensively:
https://www.qsl.net/dl4yhf/freq_counter/freq_counter.html
The input circuitry looks like this:
(Source: http://web.archive.org/web/20111121150450/http://homepage.eircom.net/~ei9gq/counter.html )