There are 20 years in a score. The word "score" can be used to mean a set or group of any 20 items, not just years.
The English word "score" is likely derived from an Old Norse word, "skora," which was used to mean a notch or a tally in addition to meaning the number 20.
One of the most well-known uses of the word "score" to mean a group of 20 years is in the Gettysburg Address, in which Abraham Lincoln said, "Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal."
Martin Luther King, Jr. echoed this in the first line of his "I Have a Dream" speech: "Five score years ago, a great American, in whose symbolic shadow we stand signed the Emancipation Proclamation."