def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i * i <= x:
        if x % i == 0:
            return False
        i += 2

    return True


n = int(raw_input())
ans = 0

for i in range(n):
    x = int(raw_input())
    if (is_prime(x)):
        ans += 1

print ans def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i * i <= x:
        if x % i == 0:
            return False
        i += 2

    return True is_prime if x == 2:
        return True
     x == 2 x 2 return True True if x < 2 or x % 2 == 0:
        return False
     x < 2 or x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i * i <= x:
        if x % i == 0:
            return False
        i += 2

     i * i <= x i * i i i x if x % i == 0:
            return False
         x % i == 0 x % i x i 0 return False False i += 2 i 2 return True True x x n = int(raw_input()) n int(raw_input()) int raw_input() raw_input ans = 0 ans 0 for i in range(n):
    x = int(raw_input())
    if (is_prime(x)):
        ans += 1 i range(n) range n x = int(raw_input()) x int(raw_input()) int raw_input() raw_input if (is_prime(x)):
        ans += 1 is_prime(x) is_prime x ans += 1 ans 1 print def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i * i <= x:
        if x % i == 0:
            return False
        i += 2

    return True def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i * i <= x:
        if x % i == 0:
            return False
        i += 2

    return True is_prime ans = 0 0 ans ans += 1 1 ans x = int(raw_input()) int(raw_input()) x n = int(raw_input()) int(raw_input()) n
def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x % 2 == 0:
        return False
    i = 3
    while i * i <= x:
        if x % i == 0:
            return False
        i += 2

    return True


n = int(raw_input())
ans = 0

for i in range(n):
    x = int(raw_input())
    if (is_prime(x)):
        ans += 1

print ans