import math
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
   
counter = 0
for i in a:
    if isprime(i) == True:
        counter += 1
print(counter) import math math n = int(input()) n int(input()) int input() input a = [] a [] for i in range(n):
    a.append(int(input())) i range(n) range n a.append(int(input())) a.append a append int(input()) int input() input def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
    isprime if x == 2:
        return True
    elif x % 2 == 0:
        return False
     x == 2 x 2 return True True elif x % 2 == 0:
        return False
     x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
    i <= math.sqrt(x) i math.sqrt(x) math.sqrt math sqrt 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 counter = 0 counter 0 for i in a:
    if isprime(i) == True:
        counter += 1 i a if isprime(i) == True:
        counter += 1 isprime(i) == True isprime(i) isprime i True counter += 1 counter 1 print(counter) print counter n = int(input()) int(input()) n counter += 1 1 counter counter = 0 0 counter a = [] [] a def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
    def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
    isprime
import math
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))

def isprime(x):
    if x == 2:
        return True
    elif x % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(x):
        if x % i == 0:
            return False
        i += 2
    else:
        return True
   
counter = 0
for i in a:
    if isprime(i) == True:
        counter += 1
print(counter)