The mythology of mathematicians includes many constructed geniuses, and Cantor is one. But history is never as straightforward as legend. Just as Hendrik Lorentz and other physicists were using the term "relativity" to refer to the same thing as Einstein, years before Einstein popularized it, there are threads of Cantor's ideas buried in his past.
The notion of one-to-one correspondence is the insight on which all of Cantor's infinite set theory rests. He never claimed to have been the first to reach this insight, and indeed he wasn't. The first may have been Galileo Galilei, in 1638, who said the following in "Dialogues Concerning the Two New Sciences":
"If I should ask further how many squares there are, one might reply truly that there are as many as the corresponding number of roots, since every square has its own root and every root has its own square, while no square has more than one root and no root more than one square."