Is it a semiprime?
Brachylog, 2 bytes
Basically a port from Fatalize's answer to the Sphenic number challenge.
ḋĊ
Try it online!
How?
ḋĊ - implicitly takes input
ḋ - prime factorisation (with duplicates included)
Ċ - is a couple
Husk, 4 bytes
Look ma no Unicode!
=2Lp
Try it online!
How?
=2Lp - a one input function
p - prime factorisation (with duplicates included)
L - length
=2 - equals 2?
Pyth, 4 bytes
q2lP
Test suite.
How?
q2lPQ - Q is implicit input.
q2 - Is equal to 2?
lPQ - The length of the prime factors of the input.