5. The number of pairs $(x, y)$ in 1 1000 that make $\frac{x^{2}+y^{2}}{7}$ an integer is $\qquad$ pairs.
5. 10011 From $\frac{x^{2}+y^{2}}{7} \in \mathbf{Z}$ we know $7 \mid x^{2}+y^{2}$.

When $7 \mid x$ and $7 \mid y$, it is obvious that $7 \mid x^{2}+y^{2}$.
When $7 \times x$ or $7 \times y$, from $7 \mid x^{2}+y^{2}$ we know, $7 \nmid x$ and $7 \nmid y$. By Fermat's Little Theorem, $x^{6} \equiv 1(\bmod 7)$, i.e., $\left(x^{2}\right)^{3} \equiv 1(\bmod 7)$, and $x^{2} \equiv -y^{2}(\bmod 7)$, so $\left(-y^{2}\right)^{3} \equiv 1(\bmod 7)$, i.e., $-y^{6} \equiv 1(\bmod 7)$, and by Fermat's Little Theorem, $y^{6} \equiv 1(\bmod 7)$, which contradicts $-y^{6} \equiv 1(\bmod 7)$.
In summary, $\frac{x^{2}+y^{2}}{7} \in \mathbf{Z}(x, y \in \mathbf{Z}) \Leftrightarrow 7|x, 7| y$.
Therefore, the number of integer pairs $(x, y)$ is $C_{142}^{2}=10011$.