def isPrime(x):
    if x == 2:
        return True

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

    for i in range(3, int(x ** 0.5) + 1, 2):
        if x % i == 0:
            return False

    return True

n = int(input())
cnt = 0
for _ in range(n):
    i = int(input())
    cnt += isPrime(i)

print(cnt) def isPrime(x):
    if x == 2:
        return True

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

    for i in range(3, int(x ** 0.5) + 1, 2):
        if x % i == 0:
            return False

    return True isPrime 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 for i in range(3, int(x ** 0.5) + 1, 2):
        if x % i == 0:
            return False

     i range(3, int(x ** 0.5) + 1, 2) range 3 int(x ** 0.5) + 1 int(x ** 0.5) int x ** 0.5 x 0.5 1 2 if x % i == 0:
            return False

     x % i == 0 x % i x i 0 return False False return True True x x n = int(input()) n int(input()) int input() input cnt = 0 cnt 0 for _ in range(n):
    i = int(input())
    cnt += isPrime(i) _ range(n) range n i = int(input()) i int(input()) int input() input cnt += isPrime(i) cnt isPrime(i) isPrime i print(cnt) print cnt cnt = 0 0 cnt def isPrime(x):
    if x == 2:
        return True

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

    for i in range(3, int(x ** 0.5) + 1, 2):
        if x % i == 0:
            return False

    return True def isPrime(x):
    if x == 2:
        return True

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

    for i in range(3, int(x ** 0.5) + 1, 2):
        if x % i == 0:
            return False

    return True isPrime n = int(input()) int(input()) n i = int(input()) int(input()) i cnt += isPrime(i) isPrime(i) cnt
def isPrime(x):
    if x == 2:
        return True

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

    for i in range(3, int(x ** 0.5) + 1, 2):
        if x % i == 0:
            return False

    return True

n = int(input())
cnt = 0
for _ in range(n):
    i = int(input())
    cnt += isPrime(i)

print(cnt)
