system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How do TV companies record viewing figures?

Surely it must be impossible to gauge an accurate figure with the amount of online viewing services available today.
gpt
TV Viewership is measured under the Nielson system, which returns "ratings" for specific demographics.  They gather the information by either having select households self-report their live viewing habits or by sending out "Nielson boxes" to certain homes to be connected to TVs to specifically send viewing reports to Nielson.  This system gives a general percentage of which households are watching what channels when.

The system has faced a ton of backlash from the public in recent years over the out dated aspects of the system and how they lack a proper way to account for DVR or streaming methods in the overall rating. It is also under criticism for how it selects it's "subjects." Plus people report having a bias of what they watch because they know they are being reported on to Nielson.  The company has recently been trying to find ways to redo the system to account for the problems.

Most networks are aware that while Nielsen ratings give a general idea of the audience, it is not exact.  That's often the point of the social network aspects of tv shows showing twitter hashtags for every episode and sites like GetGlue where anybody can "check in" to say what shows they are watching.  It gives a better idea of who is watching or plans to watch the series.  

TL;DR: TV views are measured by a outdated but somewhat-effective system of select people reporting on what they watch.