How many elliptic curves have complex multiplication? Let $K$ be a number field. Suppose we order elliptic curves over $K$ by naive height. What is the natural density of elliptic curves without complex multiplication?
More generally, suppose we order $g$-dimensional abelian varieties over $K$ by Faltings height. What is the natural density of such varieties without complex multiplication?
 A: 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).
A: 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!
A: COMMENT.-I wanted to give a succinct comment on complex multiplication for people who do not know the topic. 
Endomorphisms of a lattice $L$ are determined by numbers $\alpha$ such that $\alpha L\subset L$. When $\alpha$ is a rational integer one has the quite known endomorphisms $P\to nP$. For $\alpha$ non rational and $\alpha L\subset L$, taking two generators $w_1$ and $w_2$ of $L$ one has from $$\begin{cases}\alpha w_1=aw_1+bw_2\\\alpha w_2=cw_1+dw_2\end {cases}$$ that is root of the irreducible
$$x^2-(a+d)x+(ad-bc)=0$$ so $\alpha$ is quadratic; furthermore $$\alpha=c(\frac{w_1}{w_2})+d$$ hence $\alpha$ cannot be real (this is the origin of the locution “complex multiplication”).
Since the ring $A$ of such endomorphisms is contained in an imaginary quadratic field there are always very few automorphisms , corresponding to units of $A$, of $\mathbb C/L$ (the torus of an elliptic curve). It is known that
1) If $A$ does not contain roots of $\sqrt{-1}$ nor $\rho=\frac{-1+\sqrt 3}{2}$ the only automorphisms of $A$ are given by $\alpha=\pm 1$
2) If $\sqrt{-1}\in A$ then $\alpha\in\{\pm 1, \pm \sqrt{-1}\}$
3) If $\rho\in A$ then   $\alpha\in\{\pm 1, \pm \rho,\pm \overline \rho\}$.
In general the ring of endomorphisms defined over $\mathbb C$ of an elliptic curve $E(K)$ where $K$ is a subfield of $\mathbb C$ is identified to $\mathbb Z$ (by injectivity of $P\to nP$) so the curve has not complex multiplication or it is identified to a subring (containing $\mathbb Z$) of the ring of integers of an imaginary quadratic field in whose case the elliptic curve $E(K)$ has complex multiplication.
The cases the most known of families of elliptic curves with complex multiplication are given by $$y^2=x^3+kx,\space k\in\mathbb Z^*\text{ (multiplication by } \sqrt{-1})\qquad (1)\\y^2=x^3+k, \space k\in\mathbb Z^*\text{ (multiplication by } \sqrt{-3})\qquad (2)$$
The two fields $\mathbb Q(\sqrt{-1})$ and $\mathbb Q(\sqrt{-3})$ have the same class number equal to $1$. The theory ensures that for each imaginary quadratic field having class number equal to $1$ there is an infinite family of elliptic curves with complex multiplication by $\alpha$ explicit as in $(1)$ and $(2)$.Furthermore, it is known that there are only nine of these fields $\mathbb Q(\sqrt{-d})$ corresponding to $$-d=1,2,3,7,11,19,43,67,163$$
There is complete information about this in the literature. I stop here.
