This question is re-posted from MSE because it didn't seem to get any traction/responses there.
This is a question from this paper about a correspondence between representation numbers of quadratic forms, and pairs of isogenies between elliptic curves.
Let $(L, Q)$ be a quadratic space over a ring $R$. For a quadratic form $F$ on $R^m$, define the representation number $R_L(F)$ as the cardinality of the set $$\{(f_i) \in L^m : Q(x_1 f_1 + \cdots + x_m f_m) = F(x_1, \ldots, x_m) \text{ for all } x \in R^m\}.$$
For a basis $\{b_i\}$ of $L$, define the diagonal of $Q$ with respect to $\{b_i\}$ to be the $n$-tuple $(Q(b_i))_i$.
The following is a quote from the paper linked above:
Such pairs $(f_1, f_2)$ correspond to representations of positive definite quadratic forms $Q(x_1, x_2) = \deg(x_1 f_1 + x_2 f_2)$, hence $$\# \{(f_1, f_2) \in \operatorname{Hom}(E, E') : \operatorname{deg} f_i = m_i\} = \sum_{Q > 0,\ \operatorname{diag} Q = (m_1, m_2)} R_{\operatorname{Hom}(E, E')}(Q).$$
Here $E$ and $E'$ are elliptic curves with complex multiplication, which correspond to an intersection point of the modular polynomials $\phi_{m_1}$ and $\phi_{m_2}$.
The way this is stated, and the fact that the rest of this paper is quite accessible, makes me think that the above correspondence is either "well-known," or trivial, but I have not encountered this before and don't see at all why it is true.
Can someone provide either a reference, or a proof/explanation of this correspondence?