ST. PETERSBURG — If history is an indicator, Tuesday’s mayoral race could be a very close one.During the Aug. 29 primary, incumbent Mayor Rick Kriseman edged former Mayor Rick Baker by only 70 votes, or 0.13 percent of the 56,509 ballots cast.ELECTION DAY 2017: Get the latest news and results from the Times Bay Times.The primary wasn’t a head-to-head race (there were six candidates) and officials didn’t need to order a recount, since both Kriseman and Baker moved on to the general election.But if it’s that close again, state statute will require a recount.Pinellas County Supervisor of Elections spokesman Jason Latimer explained how officials tally results and conduct recounts when necessary:Officials will tally all mail ballots, early votes and ballots cast on election day. Those results will be posted shortly after the polls close Tuesday night. There are usually also a handful of provisional ballots — ballots cast by voters who didn’t bring valid identification to the polling location. Those voters have until Thursday at 5 p.m. to visit a Supervisor of Elections’ office with appropriate identification if they wish to have their votes counted.The county’s canvassing board will meet sometime after Thursday at 5 p.m., Latimer said, which likely means Friday. There, they will review the provisional ballots and add any they deemed eligible to the voting totals. Those totals constitute the first unofficial results.If two candidates in a particular race are with 0.5 percent of one another, state law requires a machine recount of all ballots. If, after the machine recount, candidates remain within 0.25 percent, officials must commence a manual recount.In manual recounts, Latimer said, the board tries to determine voter intent. Not all ballots are counted by hand, only the ones the machines kick out as "undervotes" or "overvotes," which harkens back to the 36-day Florida recount battle in the 2000 presidential election.An undervote is a ballot the machine reads as one in which the voter did not correctly vote for any candidate in that particular race. Like if, for example, a voter circled a candidate’s name without filling in the bubble, Latimer said.Overvotes are ballots the machine reads as ones in which the voters selected multiple candidates in a race. That could happen, Latimer said, if a voter crosses out a selection and votes for another candidate.Only then will St. Petersburg’s mayoral election finally be decided.That’s how the process played out in the St. Petersburg City Council District 6 race after the August primary. Justin Bean got the most votes. But two other candidates nearly tied for the second runoff spot. The winner of the recount would face Bean in the general election.After a machine and manual recount, Gina Driscoll beat Robert Blackmon by just two votes and earned the right to face Bean on Tuesday.Contact Josh Solomon at (813) 909-4613 or [email protected] Follow @ByJoshSolomon.