The simplest way is probably to program a microcontroller to count the power line frequency for say 10 seconds which would give you a count of 500 for a resolution of 0.1Hz (or 100 seconds for a 0.01Hz resolution). You can then do a comparison of this count to see if it's within limits and output a signal accordingly.
You can also drive a display to give a digital readout of the frequency, if desired.
You will need to generate logic level pulses from the power line for the uC input. This can be done from a low voltage, isolated transformer output (perhaps the same one that powers the uC). Run the signal into a comparator (with some feedback hysteresis to minimize effects of power line noise) to generate the 50Hz pulses.
I did a similar thing with a Stamp controller to monitor drift in the power line frequency, which was easy to program in Basic. Basic is much easier than Assembly if you've never programmed before.