Divide the number by the smallest prime number, 2
Keep dividing by 2 until it is no longer divisible
Move to the next prime number, such as 3, then 5, then 7, and so on
For each prime, divide repeatedly while the number remains divisible
Count each prime factor every time it divides the number
Include repeated factors in the count
Stop when the remaining number becomes 1
If the remaining number is greater than 1, count it as a prime factor
The total count is the number of prime factors
Example: 12 = 2 × 2 × 3, so the number of prime factors is 3
