CountFactors is a problem where one must compute the factors of a given number. Note that before attempting this problem, you should read the material on prime and composite numbers .

We incremente the count by two because based on one divisor, we can find the symmetric divisor. In other words, if *a* is a divisor of *n* then *n/a* is also one. The only case when that does not happen is when is if the number is in the form *k^2*, meaning that the symmetric divisor of *k* is also *k*.

The full solution can be found here.