People have built mains frequency counters: https://fowkc.wordpress.com/2013/12/10/mains-frequency-displ... (via https://hackaday.com/2013/12/12/mains-frequency-display/ )
The core problem is getting an accurate enough reference. That project uses an RTC IC; you might want to try building something that uses a PLL on a GPS pulse-per-second output.
The second problem is cleanly spotting where the zero-crossing is. You can take a mains feed from a current transformer or a regular transformer and low-pass filter it appropriately. It is then easy enough to use an op-amp to spot the zero-crossing.