We know that the Hilbert space of wavefunctions can be spanned by the |x> basis which is a non-countable set of infinite basis kets. Now consider the case of a particle in a box. We say that the space can be spanned by the energy eigenkets of the hamiltonian (each eigenket corresponds to an energy eigenvalue). Since the energy eigenvalues are discrete, therefore the set of corresponding eigenkets must form a countable set of infinite kets. But then isn't this a contradiction, since the cardinality of any set of basis vectors spanning the same space must be the same. In other words there must exist a bijective mapping from the one set of basis vectors to another set of basis vectors, whereas in this case we cannot define such a mapping from a countably infinite set to a non-countable infinite set.