Jelly, 3 bytes
ÆRL
Jelly has a built-in prime counting function, ÆC
and a prime checking function, ÆP
, this instead uses a built-in prime generating function, ÆR
and takes the length L
.
I guess this is about as borderline as using prime factorisation built-ins, which would also take 43 bytes with !ÆELÆv
(!
factorial, ÆE
factorise, LÆv
lengthcount prime factors)