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(input())):
    result += isprime(int(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 isprime if n == 2:
        return True
     n == 2 n 2 return True True if n % 2 == 0:
        return False
     n % 2 == 0 n % 2 n 2 0 return False False i = 3 i 3 while i * i <= n:
        if n % i == 0:
            return False
        i += 2
     i * i <= n i * i i i n if n % i == 0:
            return False
         n % i == 0 n % i n i 0 return False False i += 2 i 2 return True True n n result = 0 result 0 for i in range(int(input())):
    result += isprime(int(input())) i range(int(input())) range int(input()) int input() input result += isprime(int(input())) result isprime(int(input())) isprime int(input()) int input() input print(result) print result result = 0 0 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 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 isprime result += isprime(int(input())) isprime(int(input())) 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(input())):
    result += isprime(int(input()))
print(result)