VyxalVyxal, 43 bytes
KL2=KḢ₃ I thought something non trivial would be nice for a change. æ does the job for one byte but where's the fun in that?
-1 thanks to EmanresuA
Explained
KL2=KḢ₃ KLKḢ # len(factors(input))[1:] 2=₃ # len(^) == 21 // prime numbers have only [1, n] as factors...other numbers have 1 or 3+ factors