Full Idea
Counting a set produces a well-ordering of it. Conversely, if one has a well-ordering of a set, one can count it by following the well-ordering.
Gist of Idea
Counting results in well-ordering, and well-ordering makes counting possible
Source
Shaughan Lavine (Understanding the Infinite [1994], III.4)
Book Reference
Lavine,Shaughan: 'Understanding the Infinite' [Harvard 1994], p.53
A Reaction
Cantor didn't mean that you could literally count the set, only in principle.