def is_prime(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 += is_prime(i)
print(cnt)
 def is_prime(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 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 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 += is_prime(i) _ range(N) range N i = int(input()) i int(input()) int input() input cnt += is_prime(i) cnt is_prime(i) is_prime i print(cnt) print cnt i = int(input()) int(input()) i N = int(input()) int(input()) N def is_prime(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 is_prime(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 is_prime cnt = 0 0 cnt cnt += is_prime(i) is_prime(i) cnt
def is_prime(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 += is_prime(i)
print(cnt)

