Here is a quote from http://en.m.wikipedia.org/wiki/Hilbert_space#Hilbert_dimension (accessed: Nov. 22, 2013) :
As a consequence of Zorn's lemma, every Hilbert space admits an orthonormal basis; furthermore, any two orthonormal bases of the same space have the same cardinality, called the Hilbert dimension of the space.
But it seems to me that for a lot of quantum systems this is not so. For example, the one dimensional harmonic oscillator has a countable basis of energy eigenstates but an uncountable basis of position eigenstates (whose wave functions are delta functions).
So where am I wrong? I assume the answer has to do with the fact that delta functions are not actually part of the Hilbert space. Is that it?