import math

def isPrime(n):
    if n <= 1:
        return False
    if n == 2:
        return True
    for i in range(2,int(math.sqrt(n) + 1)):
        if n % i == 0:
            return False
    return True

t = int(input())
cnt = 0
for i in range(t):
    if isPrime(int(input())):
        cnt +=1
print(cnt)
 import math math def isPrime(n):
    if n <= 1:
        return False
    if n == 2:
        return True
    for i in range(2,int(math.sqrt(n) + 1)):
        if n % i == 0:
            return False
    return True isPrime if n <= 1:
        return False
     n <= 1 n 1 return False False if n == 2:
        return True
     n == 2 n 2 return True True for i in range(2,int(math.sqrt(n) + 1)):
        if n % i == 0:
            return False
     i range(2,int(math.sqrt(n) + 1)) range 2 int(math.sqrt(n) + 1) int math.sqrt(n) + 1 math.sqrt(n) math.sqrt math sqrt n 1 if n % i == 0:
            return False
     n % i == 0 n % i n i 0 return False False return True True n n t = int(input()) t int(input()) int input() input cnt = 0 cnt 0 for i in range(t):
    if isPrime(int(input())):
        cnt +=1 i range(t) range t if isPrime(int(input())):
        cnt +=1 isPrime(int(input())) isPrime int(input()) int input() input cnt +=1 cnt 1 print(cnt) print cnt def isPrime(n):
    if n <= 1:
        return False
    if n == 2:
        return True
    for i in range(2,int(math.sqrt(n) + 1)):
        if n % i == 0:
            return False
    return True def isPrime(n):
    if n <= 1:
        return False
    if n == 2:
        return True
    for i in range(2,int(math.sqrt(n) + 1)):
        if n % i == 0:
            return False
    return True isPrime cnt +=1 1 cnt t = int(input()) int(input()) t cnt = 0 0 cnt
import math

def isPrime(n):
    if n <= 1:
        return False
    if n == 2:
        return True
    for i in range(2,int(math.sqrt(n) + 1)):
        if n % i == 0:
            return False
    return True

t = int(input())
cnt = 0
for i in range(t):
    if isPrime(int(input())):
        cnt +=1
print(cnt)

