Proving the result of finding the number of ways in which $N$ can be resolved as a product of two factors 
The number of ways $N$ can be resolved as a product of two factors is 
  $$ \begin{array}{l} \frac 12(\alpha_1 + 1)(\alpha_2 + 1) \cdots (\alpha_k + 1), \text{ if $N$ is not a perfect square}\\
  \frac 12 [(\alpha_1 + 1)(\alpha_2 + 1) \cdots (\alpha_k + 1) + 1], \text{ if $N$ is a perfect square}
\end{array}
$$

I recently came across this identity where $N$ is any General number of the form $$N=p_1^{\alpha_1}×p_2^{\alpha_2}×...p_k^{\alpha_k}$$
and I wanted to prove this result...but I am unable to can anyone help me out??
I have tried working out this relation backwards and I could only guess that the term $$(\alpha_1+1)(\alpha_2+1)...(\alpha_k+1)$$ just represents the total number of divisors of the number $N$ and I am not able to procced any further....that is why there is $1/2$ or why there is a separate case for square numbers...also if someone is thinking of any other alternate solution then that is also welcome...
 A: First consider N to not be a perfect square
Given a divisor $p$ of the number $N$, we can say that N/p is also a divisor of $N$ and is such that $N = p × {N\over p}$
Thus every divisor of N corresponds to a way of expressing N as a product of two numbers. Thus we can write if p is a divisor of N, then.$$p \mapsto (p, {N\over p})$$ Also see that both p and ${N\over p}$ correspond to the same way of expressing N as a product of two factors. To be more precise ${N\over p} \mapsto (p, {N\over p})$
However, if N is not a perfect square, then p and ${N\over p}$ are never equal. Therefore every divisor corresponds to one way but every way corresponds to two divisors. Hence the factor of half.
Also, if N is a perfect square, then the product $(\sqrt{N}, \sqrt{N})$ corresponds to only one divisor, and so in order to find the number of ways, consider the ways other than $(\sqrt{N}, \sqrt{N})$, all these ways correspond to two divisors. Hence twice the number of these ways will give all factors of N other than $\sqrt{N}$. Now add one to this term to include the element ${\sqrt{N}, \sqrt{N}}$
A: We can also take into consideration that the number of factors in a perfect square are odd, while the number of factors in a number other than a perfect square are even. Thus, in a perfect square the factor √N will not be used up in the one to one correspondence while resolving. So, we will have to add one to the total number of divisors to take into consideration the leftover factor.
Also, the reason for taking half is that there will be a repetition in the correspondence for every pair twice. Thus, dividing it by half takes care of repetition. Hope it helps..    
