1 is not a prime number, so it should never be counted as a prime factor. It is, however, a factor of every positive integer, so it should always be counted as a factor. It's possible you've seen two different questions, one which asked:
"How many prime factors does 45 have?" (the answer is two: 3 and 5)
and one which asked
"How many positive factors does 45 have?" (the answer is six: 1, 3, 5, 9, 15, 45).
In the first case, you would definitely not count 1; in the second case you would definitely need to count 1.
For online GMAT math tutoring, or to buy my higher-level Quant books and problem sets, contact me at ianstewartgmat at gmail.com
ianstewartgmat.com