Check if i is not divisible by any other array elements and appears in the array only once
if ( v [ i ] == true && hmap . has ( i ) && hmap . get ( i ) == 1 && hmap . get ( i ) == 1 ) { count += 1 ; } }