Solution (source code)

= Solution

The given relation implies
$$
\pi(1-\phi_1)=(1+\phi_2)\pi.
$$
Take <isogeny degrees> and cancel the <positive integer> $\deg\pi$. Multiplicativity of <isogeny degree> gives
$$
\deg(1-\phi_1)=\deg(1+\phi_2).
$$
As above, $\deg(1-\phi_i)=\#E_i(\mathbb F_q)$ and $\deg\phi_i=q$. The <degree parallelogram law> on $\operatorname{End}(E_2)$ now yields
$$
\deg(1+\phi_2)+\deg(1-\phi_2)=2\deg1+2\deg\phi_2=2(q+1).
$$
Substitution proves
$$
\boxed{\#E_1(\mathbb F_q)+\#E_2(\mathbb F_q)=2(q+1).}
$$
Equivalently, their <Frobenius traces> are negatives of one another. The <isogeny degree> argument works over the <algebraic closure>, so it does not wrongly assume that $\pi$ is defined over $\mathbb F_q$; the stated quadratic-extension hypothesis is compatible with the anticommutation relation.