Deuring has the following important theorem on elliptic curves over a finite field: Let $p$ be a prime at least $5$, and $N=p+1-a$ an integer with $|a|\leq 2\sqrt{p}$, then the number of elliptic curves $E$ over $\mathbb{F}_q$ which have $N$ rational points is $\frac{p-1}{2}H(a^2-4p)$, where $H(D)$ is the Hurwitz class number of the discriminant of an order.
Is it possible to generalize this to the case where $p=2,3$? It doesn't feel likely, but I do not know any counterexamples or any obstructions that prevent such generalization. Thanks in advance.