The difference is between factor pairs and distinct factors. With square numbers, one of the factor pairs will be the same number twice. When listing the distinct factors, that number is only listed once.
45
It is 8.
15
156
5 - 2 = 3
A prime number is a positive integer that has no positive integer factors other than one and itself, and a composite number is a positive integer that have two or more positive integer factors.
Factors are just numbers. Some numbers are positive, some negative. Some numbers are prime, some composite. A prime factor is always positive, but a positive factor is not always prime.
3
If p, q and r are distinct primes and n=pxqxr then n will have 8 factors, all of which will be positive since prime numbers are all positive, which are: n(pqr), pq, pr, qr, p, q, r and 1. Here there were 3 distinct primes so the number of positive factors is 2^3. In general if you had p distinct primes then you would have 2^p positive factors.
Six distinct factors Two distinct prime factors
A prime number is a positive integer with two factors: one and the number itself. A composite number is a positive integer with more than two factors.