10. (20 points) Find the number of all positive integer solutions $(x, y, z)$ to the equation $\arctan \frac{1}{x}+\arctan \frac{1}{y}+\arctan \frac{1}{z}=\frac{\pi}{4}$.
10. By symmetry, let $x \leqslant y \leqslant z$.

Taking the tangent of both sides of the given equation, we get
$\frac{\frac{1}{y}+\frac{1}{z}}{1-\frac{1}{y z}}=\frac{1-\frac{1}{x}}{1+\frac{1}{x}}$
$\Rightarrow \frac{y+z}{y z-1}=\frac{x-1}{x+1}=1-\frac{2}{x+1}$.
If $x \geqslant 5$, then
$1-\frac{2}{x+1} \geqslant 1-\frac{2}{5+1}=\frac{2}{3} \Rightarrow \frac{y+z}{y z-1} \geqslant \frac{2}{3}$.
However, when $z \geqslant y \geqslant x \geqslant 5$,
$$
\frac{y+z}{y z-1} \leqslant \frac{5+5}{25-1}=\frac{5}{12}<\frac{2}{3},
$$

which is a contradiction. Therefore, $x=2,3,4$.
When $x=2$,
$$
\begin{array}{l}
y z-1=3(y+z) \\
\Rightarrow(y-3)(z-3)=10 \\
\Rightarrow(y, z)=(4,13),(5,8) .
\end{array}
$$

When $x=3$,
$$
\begin{array}{l}
y z-1=2(y+z) \\
\Rightarrow(y-2)(z-2)=5 \\
\Rightarrow(y, z)=(3,7) .
\end{array}
$$

When $x=4$,
$$
\begin{array}{l}
3 y z-3=5(y+z) \\
\Rightarrow 3=5\left(\frac{1}{y}+\frac{1}{z}\right)+\frac{3}{y z} \leqslant 5\left(\frac{1}{4}+\frac{1}{4}\right)+\frac{3}{16},
\end{array}
$$

which is a contradiction.
Thus, the ordered triples $(x, y, z)$ that satisfy $z \geqslant y \geqslant x$ are
$$
(x, y, z)=(2,4,13),(2,5,8),(3,3,7) \text {. }
$$

By permuting the order, we can obtain $6+6+3=15$ solutions.
In conclusion, the number of ordered positive integer solutions to the equation is 15.