TITLE: Is there a nice proof of the fact that there are (p-1)/24 supersingular elliptic curves in characteristic p?
QUESTION [36 upvotes]: If $k$ is a characteristic $p$ field containing a subfield with $p^2$ elements (e.g., an algebraic closure of $\mathbb{F}_p$), then the number of isomorphism classes of supersingular elliptic curves over $k$ has a formula involving $\lfloor p/12 \rfloor$ and the residue class of $p$ mod 12, described in Chapter V of Silverman's The Arithmetic of Elliptic Curves.  If we weight these curves by the reciprocals of the orders of their automorphism groups, we obtain the substantially simpler Eichler-Deuring mass formula: $\frac{p-1}{24}$.  For example, when $p=2$, the unique supersingular curve $y^2+y=x^3$ has endomorphisms given by the Hurwitz integers (a maximal order in the quaternions), and its automorphism group is therefore isomorphic to the binary tetrahedral group, which has order 24.
Silverman gives the mass formula as an exercise, and it's pretty easy to derive from the formula in the text.  The proof of the complicated formula uses the Legendre form (hence only works away from 2), and the appearance of the $p/12$ boils down to the following two facts:

Supersingular values of $\lambda$ are precisely the roots of the Hasse polynomial, which is separable of degree $\frac{p-1}2$.
The $\lambda$-line is a 6-fold cover of the $j$-line away from $j=0$ and $j=1728$ (so the roots away from these values give an overcount by a factor of 6).

Question:  Is there a proof of the Eichler-Deuring formula in the literature that avoids most of the case analysis, e.g., by using a normal form of representable level?
I suppose any nontrivial level structure will probably require some special treatment for the prime(s) dividing that level.  Even so, it would be neat to see any suitably holistic enumeration, in particular, one that doesn't need to single out special $j$-invariants.
(This question has been troubling me for a while, but Greg's question inspired me to actually write it down.)

REPLY [22 votes]: You can also do this "topologically".  The idea is to separately calculate the (l-adic etale) Euler characteristics of the stack $Y_0(p)$ in $\mathrm{char}$ $0$ and in  $\mathrm{char}$ $p$, then see how they must relate.  Here we go:
Over $\mathbb{C}$, and hence over $\bar{\mathbb{Q}}_p$ as well, the Euler characteristic of $Y_0(p)$ is $(p+1)\times(-1/12)$, since $Y_0(p)$ is a $(p+1)$-fold cover of $Y=M_{ell}$.
On the other hand, over $\bar{\mathbb{F}}_p$, up to "homeomorphism" $Y_0(p)$ is two copies of Y glued at the supersingular points, so the Euler characteristic is $2\times(-1/12) - S$ (where $S$ is the "number" of supersingular elliptic curves).
However, since $Y_0(p)$ has semi-stable reduction (and is constant at infinity) over $\mathbb{Z}_p$, the special fiber is gotten from the generic fiber by contracting a bunch of "circles" to points, one for each nodal point of the special fiber; thus our second ($\mathrm{char}$ $p$) Euler characteristic is equal to our first ($\mathrm{char}$ $0$) Euler characteristic plus $S$.  Comparing and solving for $S$ gives the formula pretty quickly.