By Sandy K. Johnson

As people go to the polls on Election Day, an elaborate process will unfold at a handful of news organizations that count the vote and declare the winners.

The Associated Press has counted the vote since 1852. AP not only counts the vote, it declares a winner in more than 5,000 races across the country.

The major television networks do the same thing, as part of a collaborative arrangement dating back decades and now called the National Election Pool.

In addition to the vote count, the major media players rely on exit polling and other surveys to help inform their decisions. (AP chose to go its own way after the 2016 elections, developing a new service called AP VoteCast.)

Evans Witt, a pollster who is an election night analyst for NBC News, and Stephen Ohlemacher, AP’s election decision editor, described the labor intensive process that goes into election night, including temporary help hired at all 4,000 counties and townships where the vote is literally counted. Those results are phoned into centralized operations, combined with poll data, and crunched by sophisticated computer models that help analysts call winners.

It is increasingly difficult to project winners on election night because some states allow voting by mail and others have eased absentee voting. The result is that a significant number of votes aren’t counted until the next day or even later: 40 percent in Washington state, 30 percent in California, 25 percent in Arizona, for example.

Witt and Ohlemacher had some tips for reporters:

•   Know your state’s voting rules on early in-person voting, absentee voting, mail-in voting, provisional votes and other state-specific peculiarities.

•   Do your homework on historical voting patterns in counties and big cities, so you can spot trends (and deviations). “The past is a great predictor,” Witt said.

•   Be wary of early exit poll numbers, which can be misleading because they’re drawn from a sample of people who voted early in the day.

•   In most states, you can follow real-time vote count at secretary of state websites.