there is no year zero. Thus, you only have ten years when you finish year 10, one hundred years when you finish year 100, and one thousand years when you finish year 1000.
The new millennium starts after the previous one is finished. The thousand years are only up, done, finished, at the END of year 1000 (or 2000, or whatever).
Basically, year 2000 is the two-thousandth year. When you run 5 miles, you don't claim you are done when you are in the fifth mile either, only after it is done.