You're confusing an accurate number of cycles over a 24hr24 hour period with very rigid instantaneous frequency control. That's not how it's done in most places.
The frequency is maintained at around its nominal frequency by matching generation to load - all the time that the load is greater than the generation, the frequency will be (very) gradually falling, and all the time the load is less than the generation the loadfrequency will be increasing.
The inertia is enormous and, in general, both load and generation change fairly gradually, so there's lots of time to make adjustments to generators (or loads, where people have contracted to control their loads in this way) to keep the system balanced. The frequency is allowed to drift between various limits (operational and regulatory).
In the UK at least, the correct number of cycles per day is maintained by keeping track of 'real time' and 'grid time', and the grid is run a bit fast or a bit slow to make sure they don't get too far apart.
There are accurate frequency references in use within the grid control system - that's what they're comparing with/measuring against, but the grid itself isn't phase/frequency-locked to them in any direct way.
At the bottom left of the big display in this image is a graph with a vertical wiggly yellow trace - that's the frequency of the UK National grid for a while before the photo was taken - as you can see it's not locked to anything very tightly, though the graph is probably only about +/- 0±0.3 Hz.