2. Find the number of positive integer solutions $(x, y, z)$ that satisfy the following system of equations:
\[
\left\{\begin{array}{l}
x^{2}+y^{2}=2 z^{2}, \\
z<y \leqslant z+50
\end{array}\right.
\]
Let $r=y-z$, from the condition we know $00 \Rightarrow z^{2}=x^{2}+y^{2}-z^{2}>x^{2} \Rightarrow z>x$, let $p=z-x$, then $(z-p)^{2}+2 z r+r^{2}=z^{2} \Rightarrow-2 z p+p^{2}+2 z r+r^{2}=0$.
(1) When $r$ is odd, $p$ is also odd, let $r=2 r_{1}+1, p=2 p_{1}+1$, substitute into the above equation to get $2\left(-z p_{1}+p_{1}^{2}+p_{1}+z r_{1}+r_{1}^{2}+r_{1}\right)+1=0$, obviously this equation has no integer solution;
(2) When $r$ is even, $p$ is also even, let $r=2 r_{1}, p=2 p_{1}$, substitute into the above equation to get $-z p_{1}+p_{1}^{2}+z r_{1}+r_{1}^{2}=0 \Rightarrow z\left(p_{1}-r_{1}\right)=p_{1}^{2}+r_{1}^{2}>0$,
Let $p_{1}=r_{1}+a$, then $z a=\left(r_{1}+a\right)^{2}+r_{1}^{2}=2 r_{1}^{2}+2 a r_{1}+a^{2} \Rightarrow a \mid 2 r_{1}^{2}$.
Also, $z>z-x=2 p_{1}=2\left(r_{1}+a\right) \Rightarrow 2 r_{1}^{2}+2 a r_{1}+a^{2}>2\left(r_{1}+a\right) a$
$\Rightarrow a^{2}<2 r_{1}^{2} \Rightarrow a<\sqrt{2} r_{1}$. Combining $a \mid 2 r_{1}^{2}$, we know that for $r_{1}=1,2, \cdots, 25$, the number of solutions to the system of equations is the number of positive divisors $a$ of $2 r_{1}^{2}$ that satisfy the condition $a<\sqrt{2} r_{1}$, denoted as $N\left(r_{1}\right)$. Since $2 r_{1}^{2}$ is not a perfect square, $N\left(r_{1}\right)$ is half the number of positive divisors of $2 r_{1}^{2}$, i.e., $N\left(r_{1}\right)=\frac{1}{2} \sigma\left(2 r_{1}^{2}\right)$. There are 9 prime numbers within 25: $2,3,5,7,11,13,17,19,23$.
Divide the numbers within 25 into the following 8 groups: $A_{1}=\left\{2^{0}, 2^{1}, 2^{2}, 2^{3}, 2^{4}\right\}$,
$$
\begin{array}{l}
A_{2}=\{2 \times 3,2 \times 5,2 \times 7,2 \times 11\}, A_{3}=\left\{2^{2} \times 3,2^{2} \times 5\right\}, A_{4}=\left\{2^{3} \times 3\right\}, \\
A_{5}=\left\{2 \times 3^{2}\right\}, B_{1}=\{3,5,7,11,13,17,19,23\}, B_{2}=\left\{3^{2}, 5^{2}\right\}, B_{3}=\{3 \times 5,3 \times 7\} . \\
N\left(A_{1}\right)=N\left(2^{0}\right)+N\left(2^{1}\right)+N\left(2^{2}\right)+N\left(2^{3}\right)+N\left(2^{4}\right)=\frac{1}{2}(2+4+6+8+10)=15 ; \\
N\left(A_{2}\right)=N(2 \times 3) \times 4=6 \times 4=24 ; \quad N\left(A_{3}\right)=9 \times 2=18 ; N\left(A_{4}\right)=12 ; \\
N\left(A_{5}\right)=10 ; N\left(B_{1}\right)=3 \times 8=24 ; N\left(B_{2}\right)=5 \times 2=10 ; \quad N\left(B_{3}\right)=9 \times 2=18 .
\end{array}
$$

Add up all the numbers, a total of 131, so the number of solutions is 131.