def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
    return True

N = int(input())
ans = 0
for _ in range(N):
    a = int(input())
    ans += 1 if isPrime(a) else 0
print(ans) def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
    return True isPrime if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
     n == 2 or n == 3 n == 2 n 2 n == 3 n 3 return True True elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
     n == 1 or n % 2 == 0 or n % 3 == 0 n == 1 or n % 2 == 0 n == 1 n 1 n % 2 == 0 n % 2 n 2 0 n % 3 == 0 n % 3 n 3 0 return False False N = int(n ** 0.5) N int(n ** 0.5) int n ** 0.5 n 0.5 for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
     i range(5, N + 1, 2) range 5 N + 1 N 1 2 if n % i == 0:
            return False
     n % i == 0 n % i n i 0 return False False return True True n n N = int(input()) N int(input()) int input() input ans = 0 ans 0 for _ in range(N):
    a = int(input())
    ans += 1 if isPrime(a) else 0 _ range(N) range N a = int(input()) a int(input()) int input() input ans += 1 if isPrime(a) else 0 ans 1 if isPrime(a) else 0 isPrime(a) isPrime a 1 0 print(ans) print ans ans += 1 if isPrime(a) else 0 1 if isPrime(a) else 0 ans def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
    return True def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
    return True isPrime N = int(input()) int(input()) N ans = 0 0 ans a = int(input()) int(input()) a
def isPrime(n):
    if n == 2 or n == 3:
        return True
    elif n == 1 or n % 2 == 0 or n % 3 == 0:
        return False
    N = int(n ** 0.5)
    for i in range(5, N + 1, 2):
        if n % i == 0:
            return False
    return True

N = int(input())
ans = 0
for _ in range(N):
    a = int(input())
    ans += 1 if isPrime(a) else 0
print(ans)