Every question on this topic begins the same way: break the number into primes and write it with exponents. Once you have, say, N = 2ᵃ × 3ᵇ × 5ᶜ, every factor of N is built by choosing a power of 2 from 2⁰ to 2ᵃ, a power of 3 from 3⁰ to 3ᵇ, and a power of 5 from 5⁰ to 5ᶜ. Counting factors is therefore counting choices.
Divide by small primes in order, 2, then 3, then 5, then 7, until you reach 1. Write the result neatly; a wrong exponent at this stage spoils every later step.
For example, 360 = 2³ × 3² × 5. This single line is the input for every worked example below.