Number of bras and kets

My quantum mechanics teacher told us during the class that there were many more "bra" than "kets", but I confess that I don't quite understand this. Indeed, in quantum mechanics, we work in the space of square integrable function $$L^2(\mathbb{R}^3)$$ such that each ket can be associated with a wave function $$\varphi \in L^2(\mathbb{R}^3)$$. We have defined an bra as a linear form on $$L^2(\mathbb{R}^3)$$, i.e. such that each bra can be associated to an $$\ell \in (L^2(\mathbb{R}^3))'$$ (the dual of $$L^2(\mathbb{R}^3)$$). By Riesz's representation theorem, there is an unique function $$\psi \in L^2(\mathbb{R})$$ such that $$\ell(\varphi) = \int_\mathbb{R} \psi^*\varphi,\quad \forall \varphi \in L^2(\mathbb{R}^3).$$ This shows that there is an isomorphism between $$L^2(\mathbb{R}^3)$$ and its dual. How can there be more bra than ket?

There are no more kets than bras, nor less. We could say they are equal in number (though it is hard to imagine two uncountable infinite sets having the same number of elements), and that is because the space of kets and the space of bras are isomorphic topological vector spaces.

Loosely speaking, a rigged Hilbert space (also called a Gelfand triplet) is a triad of spaces $$\Phi ⊂ \mathcal{H} ⊂ \Phi^\times (1.1)$$, such that $$\mathcal{H}$$ is a Hilbert space, $$\Phi$$ is a dense subspace of $$\mathcal{H}$$ [25], and $$\Phi^\times$$ is the space of antilinear functionals over $$\Phi$$ [26]. Mathematically, $$\Phi$$ is the space of test functions, and $$\Phi^\times$$ is the space of distributions. The space $$\Phi^\times$$ is called the antidual space of $$\Phi$$.
Associated with the RHS (1.1), there is always another RHS, $$\Phi ⊂ \mathcal{H} ⊂ \Phi' (1.2)$$, where $$\Phi'$$ is called the dual space of $$\Phi$$ and contains the linear functionals over $$\Phi$$ [26].
The basic reason why we need the spaces $$\Phi'$$ and $$\Phi^\times$$ is that the bras and kets associated with the elements in the continuous spectrum of an observable belong, respectively, to $$\Phi'$$ and $$\Phi^\times$$ rather than to $$\mathcal{H}$$. The basic reason reason why we need the space $$\Phi$$ is that unbounded operators are not defined on the whole of $$\mathcal{H}$$ but only on dense subdomains of $$\mathcal{H}$$ that are not invariant under the action of the observables.
Such non-invariance makes expectation values, uncertainties and commutation relations not well defined on the whole of $$\mathcal{H}$$. The space $$\Phi$$ is the largest subspace of the Hilbert space on which such expectation values, uncertainties and commutation relations are well defined".
It is of deepest regret that books and teachers mistakenly take a generic ket $$|a\rangle$$ to be a member of $$\mathcal{H}$$ (thus perpetuating the false idea that "there were many more "bra" than "kets""), when actually it a member of the antidual space of a dense everywhere subset of $$\mathcal{H}$$. Only in the simplest cases, in which either $$\mathcal{H}$$ is finite dimensional, or all operators on an infinite-dimensional Hilbert space are compact, then any dual or antidual of $$\mathcal{H}$$ or dense subsets of it are not needed (all operators are bounded with a discrete spectra), thus by abuse of notation one may consider $$|a\rangle \in \mathcal{H}$$.
To sum up. Generically, one has observables (call one generically $$A$$) as self-adjoint operators on complex infinite dimensional separable Hilbert spaces. If one needs to solve the spectral equation of $$A$$, $$A\phi = a \phi$$, it may turn out that the set of all "$$a$$"s is uncountable and more so, there is no $$\phi \in \mathcal{H}$$ to do the job. So one goes into a distributional extension of $$\mathcal{H}$$ to seek solutions of the spectral equation. There he may be justified to use the bra-ket notation ($$\langle F|$$ and $$|F\rangle$$) to be less cumbersome that $$F'_\phi$$ and $$F^\times _\phi$$, respectively. Also, by abuse of notation $$A$$ is used for the distributional extensions $$A^\times$$ or $$A'$$.