If $a$, $b$ and $n$ are positive integers such that $\frac{1}{a} + \frac{1}{b} = \frac{1}{n}$ then what is the total number of pair of $(a,b)$? 
If $a$, $b$ and $n$ are positive integers such that $\frac{1}{a} + \frac{1}{b} = \frac{1}{n}$ then what is the total number of pair of $(a,b)$? What if $a$, $b$ and $n$ are not necessarily positive integers?

My attempt:- If $n$ is small, like 
$$\frac{1}{a} + \frac{1}{b} = \frac{1}{5}$$
I just convert it to a suitable form like this
$$5a + 5b = ab$$
After this, I just try by hit and trial.  
But I need a suitable method to solve these type of questions. I always get stuck on these for a long time.

The answer is infinitely many pairs.
Let $a = b$. Then,
$$\frac{1}{a} + \frac{1}{b} = \frac{1}{a} + \frac{1}{a} = \frac{2}{a}$$
From which we get $n = \frac{a}{2}$. This gives $a = b = 2n$ as sufficient to fulfill the equation. Since the last equation is itself fulfilled by infinitely many different values of $a$, it follows that there are infinitely many pairs of $(a,b)$, even if $a$, $b$ and $n$ are not necessarily positive, and we haven't even looked at the cases where $a \neq b$.
As for your other question, I can't really help as I came across this by chance. I haven't taken a course on this topic so it just looks like trickery to me.
