There is more to an official recount than simply re-adding up all the numbers, or even re-checking each ballot. It's effectively going back and verifying the results of every single step of the voting process.
Each state will be different, but since you asked about Wisconsin specifically, I'll cite their official recount manual, with the recount procedure detailed starting at the bottom of page 6, in the section "How Does the Board Conduct the Recount?", which I'll summarize below. Keep in mind, that this process is repeated for every single polling place being recounted.
- Reconcile Poll Lists - Check the lists of actual voters, and make sure that each (separately kept) list agrees. This also provides
the total number of voters (and thus the expected total number of
- Review Absentee Ballots and Materials - Examine the lists of who asked for absentee ballots, and compare to the list of who
returned them. Review rejected absentee ballots (and maybe re-include
them), and defective absentee ballot envelopes (and maybe exclude
- Examine Ballot Bag or Container - Make sure no one has tampered with the sealed records since election night.
- Reconcile Ballot Count - Count how many ballots you have. If you have more ballots than voters, try to resolve that. (The reverse
- Review Provisional Ballots - Check each provisional ballot and make sure it was handled correctly.
- Count the Votes - There are three methods for counting.
- Hand Count - Sort all the ballots by candidate, then stack them up and count them. If there's any question about which candidate
was chosen, there's a separate manual for resolving that.
- Optical Scan - If the ballots can be counted by a machine, ensure the machine's seals are intact, run a test batch of ballots
through it, and then if everything checks out, run all the ballots
through (with everyone watching and possibly doing their own counts)
- Direct Record Electronic (aka touch screen) - Take the paper receipt from the voting machines, and count everything on it by hand.
Compare the results to what the machine originally reported.
- Secure Original Materials - Put everything away.
- Prepare new Canvass Statement - If anything changed after all that, write it up.
The steps in 6.2 and 6.3 pretty much guarantee that every vote will be counted as it was cast, even if the machine was hacked to afterwards report a different total. Since no pre-totaled numbers are used, a prior fake or erroneous total wouldn't even be relevant.
However, the recount can't detect any discrepancies caused by a hacked machine recording the voter's intent wrong in the first place. That's where the idea of a "Voter verified paper trail" comes in: In theory, the voter saw the paper receipt (while it was in the machine) and confirmed that the vote was correct. In practice, I'm sure some people don't bother checking it, but enough would that any problems should have been caught on voting day.
I will note that PA mostly uses electronic machines which do not have a voter verified paper trail. I would expect something equivalent to the other steps to happen, including checking the machines for signs of tampering, but the Step 6 equivalent is "open up the machines and re-add their reported totals". This article has more detail, but it also points out that there's no centralized counting - any vote tampering would have to be done on a machine-by-machine basis.