def is_prime(n):

  for i in range(2, int(n ** 0.5) + 1):

    if n % i == 0: return False

  return True



count = 0

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

  if is_prime(int(eval(input()))) : count += 1

print(count)
def is_prime(n):

  if n == 2: return True

  if n < 2 or n % 2 == 0: return False

  return pow(2, n - 1, n) == 1



count = 0

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

  if is_prime(int(eval(input()))) : count += 1

print(count)
def is_prime(n):
    for i in range(2, int(n**0.5) + 1):
        if n % i == 0:
            return False
    return True


count = 0
for i in range(int(eval(input()))):
    if is_prime(int(eval(input()))):
        count += 1
print(count)

def is_prime(n):
    if n == 2:
        return True
    if n < 2 or n % 2 == 0:
        return False
    return pow(2, n - 1, n) == 1


count = 0
for i in range(int(eval(input()))):
    if is_prime(int(eval(input()))):
        count += 1
print(count)

-    for i in range(2, int(n**0.5) + 1): -        if n % i == 0: -            return False -    return True +    if n == 2: +        return True +    if n < 2 or n % 2 == 0: +        return False +    return pow(2, n - 1, n) == 1