the solution of the CountSemiprimes