This turns out to be an application of the multiplication principle for counting things.
For example, suppose we want to count (or find all of) the divisors of n = 144.
Begin by forming the prime factorization of 144:
144 = 24 . 32.
So any divisor of 144 must be a product of some number of 2's (between 0 and 4) and some number of 3's (between 0 and 2). So here's a table of the possibilities:
From the table, it's easy to see that there are 5 x 3 = 15 divisors of 144.
In general, if you have the prime factorization of the number n, then to calculate how many divisors it has, you take all the exponents in the factorization, add 1 to each, and then multiply these "exponents + 1"s together.