The ultra-tight, undecided races to determine San Francisco’s next district attorney and District Five supervisor will hinge on the roughly 68,000 ballots that the city’s Elections Department still hasn’t tallied.

Although election officials will be working over the weekend, the count won’t be completed until next week, said John Arntz, the city’s elections chief.

The Elections Department said it had about 86,000 votes early Wednesday that hadn’t been tallied, a number that was whittled by only about 18,000 with its afternoon vote-counting update. Among the uncounted total were 12,500 provisional votes — ballots given to voters whose eligibility must be verified before their votes can be counted.

What’s more, the city will accept ballots until Friday as long as they were postmarked by election day. The Elections Department expects around 10,000 more ballots to arrive by then, but they won’t slow the count much, Arntz said.

“With the new (voting) system, the scanning of mail ballots is much quicker,” Arntz said. “We could have almost all of them counted by Friday.”

Since provisional ballots have to be hand-checked, however, they take longer to verify. Election workers expect to begin tallying those votes Saturday and will be working through the weekend, Arntz said.

Most of the votes counted Wednesday were mail ballots that arrived at City Hall on election day, with the rest coming from mail ballots turned in at the polls, Arntz said. He expects the vote count to speed up Thursday.

Besides the races for district attorney and District Five supervisor, the outstanding ballots will determine the fates of Proposition A — the $600 million affordable housing bond — and Proposition D — a measure to tax Uber and Lyft rides to pay for transit improvements. Both need two-thirds votes to pass, and both were narrowly above that bar after Wednesday’s updated count.

This was the first city election with the new $8.46 million voting system that’s designed to be more secure, easier to use and more accessible to people with disabilities.

“The process went fine,” Arntz said. “We’re still learning the system, but we haven’t received any complaints.”

There were a couple of minor changes that had to be made on the fly Tuesday, he said. For example, the results on the city’s website originally included the number of overvotes — people who cast ballots for more than one candidate or voted both ways on a measure — and undervotes — people who didn’t vote in one or more races.

Those votes or nonvotes weren’t tallied, but when the Elections Department included them in the total number of ballots cast in a contest, it meant that the actual percentage of votes for the candidates or ballot measures didn’t add up to 100%, leading to widespread confusion.

Election officials noticed the problem late Tuesday and dropped the overvotes and undervotes from totals.

Dominic Fracassa and John Wildermuth are San Francisco Chronicle staff writers. Email: dfracassa@sfchronicle.com, jwildermuth@sfchronicle.com Twitter: @dominicfracassa @jfwildermuth