What actually happens in sentencing is that you look up the relevant sentencing guidelines in the (public, easily downloaded) federal sentencing guidelines. The guidelines are broken up by groups of statutes. They establish offense levels, from 1 (jaywalking) to 43 (mass murder). You take the offense level and look it up on a chart against your offender history (Swartz had no criminal history) and get a sentencing range.
Each guideline starts with a (usually low) base offense level, and then a series of clauses that adjust that level upwards or downwards based on the conduct charged. For CFAA, modifiers include stuff like using sophisticated means to evade detection, or making a bunch of money, or putting critical systems in danger.
The actual sentencing is a phase of the trial, occurring after conviction. The court has the probation office write a PSR, which is a confidential memo suggesting a sentence based on the guidelines. The prosecution argues for upwards departures for the PSR; the defense does the opposite; the judge ultimately decides.
Crucially: the sentencing guidelines generally don't work by multiplying the number of counts against the suggested offense level. Rather: like charges group, and you're generally sentenced based on the highest offense level of the group.
We don't really have to guess about what Swartz faced. We don't just have this New Yorker article to go on; Swartz's own attorney discussed the likely sentencing ranges. This article suggests that prosecutors were looking for 6 months on a guilty plea (they seemed hell-bent on coming up with some custodial sentence for Swartz; there seems to be something to the idea that they had a grudge against Swartz). More importantly, though, we have some of their rationale for the supposed 80 month sentence they said they'd seek if Swartz went to trial: they intended to argue that Swartz incurred 2 million dollars worth of losses. That's a self-evidently stupid argument, because there's no plausible way Swartz could have recouped even $1 from his offense, let alone $2,000,000. The documents he hoped to release had virtually no commercial value. Any damage (ie: worker hours burned cleaning up for what he did) he caused was incidental, and likely well below six figures. But the guideline offense level modifier implies the opposite of this fact pattern.
Swartz's attorney believed it was likely that had Swartz gone to trial and lost on all counts, his ultimate sentence would still could have come in below the level at which the guidelines recommend straight probation; that is: he believed Swartz could have gone to trial, lost, and still did better than the plea deal offered by the prosecutors.
It's not really the fault of anyone on HN that these lurid potential sentences get tossed around in discussions, because federal prosecutors issue press releases that discuss the maximum possible sentence in those terms. The media abets that dishonesty by repeating the claim, or by doing insufficient homework and using the same math.
You should be irritated when you read written sources that talk about naive maximum sentences this way.
At any rate: there is no chance Swartz was unaware of any of this. Not just because he had an excellent attorney who no doubt explained all of this stuff very early on in the process, but because Swartz was exactly the kind of nerd who would have had the federal sentencing guidelines bookmarked somewhere in his browser.