Solved CountSemiprimes in java