Score is another of those very common words that have a surprising number of different uses. The most obvious use is as a verb in sport: you can score a goal or a point, for example. Of course it can also be a noun in terms of sport, such as in What’s the score? Less frequently though, we also encounter score to refer to the music from a film or television programme, and as verb meaning to cut or scratch a line on a surface. And a score can mean twenty. Despite all these different meanings though, each use of the word actually shares the same origin.
We can go right back to the Proto-Indo-European root sker- (to cut), which led to the Old Norse skor (mark, notch, or incision), and the Icelandic skor and the Old English scoru, both meaning twenty. Here we can easily see how it came to mean to cut or scratch a line, but what about twenty? This may have come from the practice of counting large numbers (e.g. livestock) with a stick scored with twenty notches.
Jumping forward to the early 15th century, we find to score being used to refer to the act of making a mark with chalk on a wall in a tavern to record how many drinks a customer had had. This gradually evolved to also refer to marking the points in a game. The phrase to settle a score, by the way, comes from the use of to score to refer to drink bills, and meant to settle your bill and not, as you might imagine, to level the score in sports. This is also why we refer to a bar tab as a slate, as your drinks might be tallied on a piece of slate, and not on the wall.
In terms of film music, the word apparently originally referred to the practice of connecting different staves with scores of lines.