def isprime(n):

    i = 2

    while i ** 2 <= n:

        if n % i == 0:

            return False

        i += 1

    return True



result = 0

for i in range(int(eval(input()))):

    result += isprime(int(eval(input())))

print(result)
def isprime(n):

    if n == 2:

        return True

    if n % 2 == 0:

        return False

    i = 3

    while i * i <= n:

        if n % i == 0:

            return False

        i += 2

    return True



result = 0

for i in range(int(eval(input()))):

    result += isprime(int(eval(input())))

print(result)
def isprime(n):
    i = 2
    while i**2 <= n:
        if n % i == 0:
            return False
        i += 1
    return True


result = 0
for i in range(int(eval(input()))):
    result += isprime(int(eval(input())))
print(result)

def isprime(n):
    if n == 2:
        return True
    if n % 2 == 0:
        return False
    i = 3
    while i * i <= n:
        if n % i == 0:
            return False
        i += 2
    return True


result = 0
for i in range(int(eval(input()))):
    result += isprime(int(eval(input())))
print(result)

-    i = 2 -    while i**2 <= n: +    if n == 2: +        return True +    if n % 2 == 0: +        return False +    i = 3 +    while i * i <= n: -        i += 1 +        i += 2