Let $n$ be a given positive integer. How many solutions are there in ordered positive integer pairs $(x,y)$ to the equation
$$\frac{xy}{x+y}=n?$$
1. Start with the given equation:
   \[
   \frac{xy}{x+y} = n
   \]
   Multiply both sides by \(x + y\) to clear the fraction:
   \[
   xy = n(x + y)
   \]
2. Rearrange the equation to isolate terms involving \(x\) and \(y\):
   \[
   xy - nx - ny = 0
   \]
   Add \(n^2\) to both sides to factorize:
   \[
   xy - nx - ny + n^2 = n^2
   \]
   Factor the left-hand side:
   \[
   (x - n)(y - n) = n^2
   \]
3. To find the number of solutions in ordered positive integer pairs \((x, y)\), consider the factors of \(n^2\). Let \(d(n^2)\) denote the number of positive divisors of \(n^2\).

4. Each pair of factors \((a, b)\) of \(n^2\) corresponds to a solution \((x, y)\) where:
   \[
   x - n = a \quad \text{and} \quad y - n = b
   \]
   or
   \[
   x - n = b \quad \text{and} \quad y - n = a
   \]
   Since \(a\) and \(b\) are positive divisors of \(n^2\), both \(x\) and \(y\) will be positive integers if \(a\) and \(b\) are positive.

5. The number of such pairs \((a, b)\) is exactly the number of positive divisors of \(n^2\), denoted by \(d(n^2)\).

6. Since both factors \((x - n)\) and \((y - n)\) must be positive, there are no negative solutions to consider.

Thus, the number of solutions in ordered positive integer pairs \((x, y)\) to the equation \(\frac{xy}{x+y} = n\) is \(d(n^2)\).

The final answer is \(\boxed{d(n^2)}\).