Credit: Photo by Timothy Rezendes via Creative Commons

More than 100,000 Philadelphians will head to 1,694 polling locations across the city to cast their votes and select a new mayor, new council members and a dozen other public offices.

After the polls close at 8 p.m., it’ll be a waiting game as votes are counted and tallied before we know who the next leaders of this city will be. But what happens in between when you enter your ballot and it gets counted involves cartridges of data, secret bags and undercover cops.

A city elections official broke down how the process works and what happens to your vote after you press the big “VOTE” button:

On the Philadelphia voting machines that have been around since 2002, when the voter hits that button, their selections are recorded by a digital, read-only cartridge in the back of the machine. In addition, the machine also produces printouts and tapes with results, providing back-up forms of counting at each booth.

When 8 p.m. rolls around and the polls officially close, the cartridges are removed from the back of the machine and put into what amounts to a secret bag, filled with the cartridges, printouts and tapes that come out of the machines.

After the bags are ready, undercover police officers come to each polling location (yep, all 1,694), pick up the bags, and physically take them to Regional Transmission Centers where cartridges are collected for that area of the city. There are about six centers and their locations are kept secret.

Staff members at the RTC centers are there, armed with cartridge readers. They plug in the devices and the data is then digitally transmitted via a secure line to the main voter registration office at Columbus Boulevard and Spring Garden Street.

(Want to watch the votes get counted? It’s open to the public. Head to the sixth floor 520 N. Christopher Columbus Blvd. if you want to watch elections officials tally things up.)

Once the data is transmitted to the central command center, it’s almost immediately uploaded onto the website, That will start happening at about 8:30 p.m. when the first districts come through.

But if you have 1,694 friends and want to figure out the votes early, you can travel to every voting location and see who won at each one. Seven copies of the tape/ paper results will be placed on the door for committeepeople and ward leaders to pick up, and they’ll be there for about 20 minutes after polls close. So if you want to stalk your polling place post-8 p.m., that’s a thing you can do.

Many Center City locations will be reported first, whereas locations in the far Northeast or the far South will come in later in the night, sometimes as late as 10:30 p.m. By that time, about 95 percent of the votes will have been counted.

Rarely will you see that all 100 percent of votes are counted that night, as some polling locations won’t use all the voting machines they’re allotted, but those machines and cartridges still have to be accounted for, even if they didn’t register any votes.

Follow along on Twitter @billy_penn and on our site as the results of tonight’s election start to roll in.

Anna Orso was a reporter/curator at Billy Penn from 2014 to 2017.