Is there any formula for number of divisors of $a \times b$? Let $a$ and $b$ be two numbers,  
Number of divisors of $a$ is $n_1$;
Number of divisors of $b$ is $n_2$;  
How to find the number of divisors $N$ of product $a \times b$ by using known number of divisors of factors $n_1$ and $n_2$?
If $a = 20$ and $b = 21$, then $n_1 = 6$ (number of divisors of $a$), $n_2 = 4$ (number of divisors of $b$. Then $a \times b = 420$ and $N = 32$ (number of divisors of $a \times b$).
Is there a formula to find $N$ in terms of $n_1$ and $n_2$?
 A: As lhf said, if $a$ and $b$ have no common divisors (other than 1, that is $\gcd(a, b) = 1$), then
$$\tau(ab) = \tau(a) \cdot \tau(b)$$
Where $\tau(n)$ is the number of positive divisors of $n$. However, when they do have common divisors, it is not as simple. There is, however a general way to do calculate $\tau(n)$ if you know the prime factorization of n:
$$n = {p_1}^{\alpha_1} {p_2}^{\alpha_2} \ldots {p_n}^{\alpha_n}$$
All divisors are then of the form:
$$d = {p_1}^{\beta_1} {p_2}^{\beta_2} \ldots {p_n}^{\beta_n}$$
With $0 \le \beta_i \le \alpha_i$. Thus, each $\beta_i$ can be chosen in $\alpha_i + 1$ different ways, and by the multiplicative principle:
$$\tau(n) = (\alpha_1 + 1)(\alpha_2 + 1) \ldots (\alpha_n + 1)$$
Since you can easily find the prime factorization $ab$ if you know the prime factorization of $a$ and $b$ (by just adding the exponents), I think this would answer your question. Also note that the property noted by lhf can easily be showed from this formula, because two numbers are coprime if and only if they don't share any prime factors. 
A: If $a$ and $b$ are coprime, then $\tau(ab)=\tau(a)\tau(b)$.
In your example, this gives you $\tau(420)=24$, not $32$. Check your work.
I don't know a formula for $\tau(ab)$ when $a$ and $b$ have a nontrivial common factor, unless you can factor $a$ and $b$ into primes.
