How many elliptic curves have complex multiplication?
The natural density of elliptic curves with complex multiplication is 0 (say we order by the coefficients A, B in y^2 = x^3 + Ax + B). This follows by Proposition 5 of http://arxiv.org/abs/0804.2166 combined with Hilbert irreducibility:
Since the family of elliptic curves given above has surjective mod-\ell Galois representation for all \ell, it follows from Hilbert irreducibility that a density 1 subset of its members have surjective mod \ell image. Then, by Proposition 5, these members have trivial endomorphism ring. This same proof works for rational families of arbitrary genus with surjective mod \ell Galois representation.
Note that the assumption on rationality is important to apply Hilbert irreducibility, so the same proof will not go through for the moduli space of Abelian varieties in genus more than 7, as the moduli space is not rational (or even unirational).
I agree with Lubin — surely the density of CM curves is $0$. I have not thought through a proof of this, but I think you could prove it by using asymptotic formulas for the number of all curves up to a given height compared to a formula for the number of CM curves up to that height. You would use that there are finitely many CM $j$-invariants over a given field, and count twists.
Here is a paper by the way with some data, see Table A.5. Also, there is a discussion somewhere in there of how many curves there are up to a given height.
- J. S. Balakrishnan, W. Ho, N. Kaplan, S. Spicer, W. Stein, and J. Weigandt, Databases of elliptic curves ordered by height and distributions of Selmer groups and ranks, arXiv preprint arXiv:1602.01894 (2016).
Update 1. It is certainly true that there are very few elliptic curves over a number field with CM compared to all elliptic curves over a number field, containing the field $K$ of CM to avoid trivial situations, because, as said above, there are only finitely $j$-invariants attached to $K$. However, I do not think it is in any way feasible to work with Weierstrass equations to bound the number of curves with naive height at most $H$ having CM by $K$. For one thing, the class number of $K$ gets very large as the discriminant of $K$ goes off to infinity, and it is in no way obvious how to write down Weierstrass equations with algebraic integer coefficients for the corresponding elliptic curves. In addition, I am not an enthusiast for studying elliptic curves in this manner. I personally think that the only good way to order elliptic curves over a number field is in isogeny classes, ordered by their conductor, as, for example, is done for elliptic curves over $\mathbb{Q}$ in Cremona's book.
- J.E. Cremona. Algorithms for modular elliptic curves. Cambridge University Press, Cambridge, 1997. vi+376 pp.
Even for the smallest conductor of elliptic curves over $\mathbb{Q}$, which is $11$, there is one elliptic curve in the single isogeny class with very large coefficients.
In case it is of interest, see this short article of Coates on the conjecture of Birch and Swinnerton-Dyer, including some material on the CM case.
- J. Coates, Lectures on the Birch-Swinnerton-Dyer Conjecture, Notices of the International Congress of Chinese Mathematicians 1, 29-46 (2013).
Update 2. The answer you get depends on how, exactly, you phrase the problem. Off the top of my head, the easiest way to proceed, for elliptic curves over a number field, would be as follows.
If $E$ has CM by $\mathcal{O}_L$, then its $j$-invariant is an algebraic integer, whose degree over $\mathbb{Q}$ is the class number of $L$. There is a variant of this which works for $E$ with CM by something smaller than the full ring of integers of $L$.
A crude consequence of the Brauer-Siegel theorem is that, for a given bound $X$, there are at most finitely many discriminants $D$ such that $h(-D)$ is less than $X$.
Taken together, this would show that over a given field $K$, there are only finitely many $j$-invariants which have (potential) CM. Of course, for each such $j$-invariant, there are infinitely many twists, and so you have to decide how to count.
At the opposite extreme, in terms of sophistication, there is a conjecture of Edixhoven which hopes to give a lower bound for the field of moduli of an abelian variety with CM in terms of the discriminant of its endomorphism ring.
- S.J. Edixhoven, B.J.J. Moonen, and F. Oort, editors. Open problems in algebraic geometry, Bull. Sci. Math. 125, 1-22 (2001).
Since two teams (Andreatta-Goren-Howard-Madapusi Pera, Yuan-Zhang) have proved/are proving the averaged Colmez conjecture, and Tsimerman proved that Colmez implies Edixhoven, it seems we may have the same sort of finiteness results for abelian varieties.
F. Andreatta, E. Goren, B. Howard, and K. Madapusi Pera, Faltings heights of abelian varieties with complex multiplication, arXiv preprint arXiv:1508.00178 (2015).
X. Yuan and S. Zhang. On the Averaged Colmez Conjecture, arXiv preprint arXiv:1507.06903 (2015).
J. Tsimerman. A proof of the André-Oort conjecture for $\mathcal{A}_g$, arXiv preprint arXiv:1506.01466 (2015).
We would not have known this just a few years ago!