TITLE: How many positive integers are factors of a given number?
QUESTION [10 upvotes]: I've been trying to find / generate a formula for the following problem: 

Given a number, how many positive integers are factors of this number.

In practice, you could simply build a table as such (lets assume the number is 36):
1 |  36 
2 |  18 
3 |  12 
4 |  9  
6 |  6
Thus there are 9 positive integers that are factors to 36.
This method seems like it would be taxing if the number was large. So I was thinking that if you knew the prime factorization for a number such as  $\,2 \cdot 2 \cdot 3 \cdot 3 = 36, \,$ there should be a formula for the number of unique combinations you can multiply these prime factors together. That's where I am stuck. Thanks in advance!

REPLY [2 votes]: Given the prime factorization of $m\in\Bbb N$,
$$m = \prod_{k = 1}^{n} p_k^{a_k}$$
We want to find the number of $n$-tuples of the Cartesian product of sets $A_1\times A_2\times ... \times A_n$ given by
$$A_k=\{p_k^0,p_k^1,...,p_k^{a_k} \}$$
As we can easily see,
$$|A_k|=a_k+1$$
Now, if we have $n$ sets $A_1,A_2,...,A_n$, by the rule of product:
$$|A_1\times A_2\times ...\times A_n|=|A_1|\cdot |A_2|\cdot\ ...\ \cdot|A_n|$$
$$=(a_1+1)\cdot (a_2+1)\cdot \ ... \ (a_n+1)$$
$$=\prod_{k=1}^n(a_k+1)$$