The vote count is taken from the tally, after it is reported (e.g. at the precinct level). As the New York Times wrote about the first results being skewed:
But the initial skew in a state’s results may last only a short while, and it will be influenced by which counties or precincts in the state are the fastest to report, said Charles Stewart III, an elections expert at the Massachusetts Institute of Technology.
The percentage reported may refer to two things: percentage of precincts reporting or the percentage of votes counted.
The percentage of precincts reporting can be precise, because the number of precincts is known beforehand. The Associated Press writes about this:
In all races tabulated by AP, we provide details on precincts reporting. This figure is the percentage of precincts in a race from which AP has received and is reporting results. In many states, this figure is a reasonably accurate estimate of the amount of vote counted, particularly in those states that do not separately report results for ballots cast in advance from those cast on Election Day.
However, the percentage of precincts reporting can be deceiving. In some jurisdictions, election officials may report all of the advance vote as being from a single precinct. A precinct may also be counted as reporting, but that does not mean it has released all of its results. This is why it’s possible for more votes to be added to the count in a race even when 100% of precincts are reporting. This issue is often evident in a race where mail ballots may be accepted and counted well after Election Day. This is not a new phenomenon, but it will be a factor in more states in 2020 due to the expansion of advance voting brought on by the coronavirus pandemic.
The percentage of votes counted will be an estimate until all the votes are counted. After all, before you count all the votes, you won't know how many there are precisely, but you can make an estimate. The Associated Press writes about this:
In statewide races for president, Senate and governor, AP provides an assessment of the expected vote. It starts with an estimate. Based on a variety of factors, such as turnout in recent elections and details on the advance vote, AP’s Election Research group sets an expected turnout figure in a state. This is done as a comparison to the past general election; for example, we might estimate the 2020 general election vote will be 103% of the 2016 vote.
As more states expand early voting and voting by mail, the details on advance vote become more important and valuable in setting that estimate. It provides us with a known data point for the current election, helping make the estimate more precise from the outset.
Once polls close and we start getting actual returns, we further refine the estimate with actual data.
To be sure, expected vote is an estimate and can fluctuate as the vote tabulation takes place and we learn more about how many people have actually cast a ballot.