We know primality is in P which gives an answer for all prime numbers that the number of prime factors of a prime number is 1.

Is there an algorithm in P that would give answers for composite numbers about the number of their prime factors?

Meaning:

- 21 => 2
- 63 => 2 or 3 if We count factor multiple times