Every number has two factors - 1 and the number itself
So now the question becomes of finding a 3 digit number having exactly one factor other than 1 and the number itself.
Factors always exist in pairs which means that if x is a factor of n, then n/x is also a factor of n.
Since the number has only one factor other than 1 and the number itself, it means that x and n/x are equal, otherwise the number will have 4 factors - 1, the number itself(n), x, n/x, where x is a factor. And since the number has no other factor,x has to be a prime number.
Therefore the number is a perfect square of a prime number and is a 3 digit number -
which makes 7 such numbers