def is_prime(n):
    if n == 1:
        return False
    elif n == 2 or n == 3:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
        return True
        
n = int(input())
count = 0

for _ in range(n):
    m = int(input())
    if is_prime(m):
        count += 1

print(count) def is_prime(n):
    if n == 1:
        return False
    elif n == 2 or n == 3:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
        return True
         is_prime if n == 1:
        return False
    elif n == 2 or n == 3:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
        return True
         n == 1 n 1 return False False elif n == 2 or n == 3:
        return True
     n == 2 or n == 3 n == 2 n 2 n == 3 n 3 return True True elif n % 2 == 0:
        return False
     n % 2 == 0 n % 2 n 2 0 return False False for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
         i range(3, int(n ** 0.5) + 1, 2) range 3 int(n ** 0.5) + 1 int(n ** 0.5) int n ** 0.5 n 0.5 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 count = 0 count 0 for _ in range(n):
    m = int(input())
    if is_prime(m):
        count += 1 _ range(n) range n m = int(input()) m int(input()) int input() input if is_prime(m):
        count += 1 is_prime(m) is_prime m count += 1 count 1 print(count) print count count += 1 1 count def is_prime(n):
    if n == 1:
        return False
    elif n == 2 or n == 3:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
        return True
         def is_prime(n):
    if n == 1:
        return False
    elif n == 2 or n == 3:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
        return True
         is_prime n = int(input()) int(input()) n count = 0 0 count m = int(input()) int(input()) m
def is_prime(n):
    if n == 1:
        return False
    elif n == 2 or n == 3:
        return True
    elif n % 2 == 0:
        return False
    else:
        for i in range(3, int(n ** 0.5) + 1, 2):
            if n % i == 0:
                return False
                
        return True
        
n = int(input())
count = 0

for _ in range(n):
    m = int(input())
    if is_prime(m):
        count += 1

print(count)