pretty sure numbers are now generated from the cable or satellite company, no more boxes on your set.
I had a similar question to a contractor friend who was doing TV advertising, and he explained he pays by how many viewers watch the show, I asked how do they know, he said they keep track of everything being broadcast into your home on satellite or cable, and he is billed accordingly.
He also had to pay the actor in his commercial (a retired sports personality) from those same numbers (residuals I think is the term?).
Good point. I’ve been putting my tv on the Smithsonian channel during football games, even though I wasn’t watching it.