5. The number of pairs of positive integer solutions $(x, y)$ for the equation $\frac{1}{x}+\frac{1}{y}+\frac{1}{x y}=\frac{1}{2006}$ is ( ).
(A) 16
(B) 24
(C) 32
(D) 48
5.D.

From $\frac{1}{x}+\frac{1}{y}+\frac{1}{x y}=\frac{1}{2006}$, we get
$x y-2006 x-2006 y-2006=0$.
Rearranging gives
$$
\begin{array}{l}
(x-2006)(y-2006)=2006 \times 2007 \\
=2 \times 3^{2} \times 17 \times 59 \times 223 .
\end{array}
$$

Thus, the positive integer solutions to the original equation are
$$
(1+1)(2+1)(1+1)(1+1)(1+1)=48 \text { (sets). }
$$