Let $|\cdot|$ denote the usual norm in $\mathbb{Z}^d$. Given a finite subset $S \subset \mathbb{Z}^d$, let $\varphi(S) = \sum_{z \in S}|z|^2$. Given $m \in \mathbb{N}$, what is the size of $\varphi^{-1}(m)$? In particular, a rough upper bound would suffice.