#import time
#start = time.time()

def isPrimeNumber(a):
    for i in range(2, int(a**0.5)+1):
        if a % i == 0:
            return False
    return True


n = int(input())
data = [int(input()) for i in range(n)]

count = 0
for a in data:
    if isPrimeNumber(a):
        count += 1
print(count)
#end = time.time()
#print(end - start) def isPrimeNumber(a):
    for i in range(2, int(a**0.5)+1):
        if a % i == 0:
            return False
    return True isPrimeNumber for i in range(2, int(a**0.5)+1):
        if a % i == 0:
            return False
     i range(2, int(a**0.5)+1) range 2 int(a**0.5)+1 int(a**0.5) int a**0.5 a 0.5 1 if a % i == 0:
            return False
     a % i == 0 a % i a i 0 return False False return True True a a n = int(input()) n int(input()) int input() input int(input()) for i in range(n) for i in range(n) i range(n) range n for i in range(n) int(input()) int input() input data = [int(input()) for i in range(n)] data [int(input()) for i in range(n)] count = 0 count 0 for a in data:
    if isPrimeNumber(a):
        count += 1 a data if isPrimeNumber(a):
        count += 1 isPrimeNumber(a) isPrimeNumber a count += 1 count 1 print(count) print count data = [int(input()) for i in range(n)] [int(input()) for i in range(n)] data count += 1 1 count def isPrimeNumber(a):
    for i in range(2, int(a**0.5)+1):
        if a % i == 0:
            return False
    return True def isPrimeNumber(a):
    for i in range(2, int(a**0.5)+1):
        if a % i == 0:
            return False
    return True isPrimeNumber n = int(input()) int(input()) n count = 0 0 count
#import time
#start = time.time()

def isPrimeNumber(a):
    for i in range(2, int(a**0.5)+1):
        if a % i == 0:
            return False
    return True


n = int(input())
data = [int(input()) for i in range(n)]

count = 0
for a in data:
    if isPrimeNumber(a):
        count += 1
print(count)
#end = time.time()
#print(end - start)