I can't find out how to implement (Number.isInteger(i), but it does count the prime numbers of the range you give it.