import math
cnt = 0
N = int(input())
for i in range(N):
    n = int(input())
    if n % 2:
        area = round(math.sqrt(n))
        prime_ng = 0
        for i in range(2, area + 1):
            if n % i == 0:
                prime_ng = 1
                break
        if prime_ng == 0:
            cnt += 1
    elif n == 2:
        cnt += 1
print(cnt) import math math cnt = 0 cnt 0 N = int(input()) N int(input()) int input() input for i in range(N):
    n = int(input())
    if n % 2:
        area = round(math.sqrt(n))
        prime_ng = 0
        for i in range(2, area + 1):
            if n % i == 0:
                prime_ng = 1
                break
        if prime_ng == 0:
            cnt += 1
    elif n == 2:
        cnt += 1 i range(N) range N n = int(input()) n int(input()) int input() input if n % 2:
        area = round(math.sqrt(n))
        prime_ng = 0
        for i in range(2, area + 1):
            if n % i == 0:
                prime_ng = 1
                break
        if prime_ng == 0:
            cnt += 1
    elif n == 2:
        cnt += 1 n % 2 n 2 area = round(math.sqrt(n)) area round(math.sqrt(n)) round math.sqrt(n) math.sqrt math sqrt n prime_ng = 0 prime_ng 0 for i in range(2, area + 1):
            if n % i == 0:
                prime_ng = 1
                break
         i range(2, area + 1) range 2 area + 1 area 1 if n % i == 0:
                prime_ng = 1
                break
         n % i == 0 n % i n i 0 prime_ng = 1 prime_ng 1 break if prime_ng == 0:
            cnt += 1
     prime_ng == 0 prime_ng 0 cnt += 1 cnt 1 elif n == 2:
        cnt += 1 n == 2 n 2 cnt += 1 cnt 1 print(cnt) print cnt prime_ng = 0 0 prime_ng n = int(input()) int(input()) n cnt += 1 1 cnt cnt += 1 1 cnt cnt = 0 0 cnt N = int(input()) int(input()) N prime_ng = 1 1 prime_ng area = round(math.sqrt(n)) round(math.sqrt(n)) area
import math
cnt = 0
N = int(input())
for i in range(N):
    n = int(input())
    if n % 2:
        area = round(math.sqrt(n))
        prime_ng = 0
        for i in range(2, area + 1):
            if n % i == 0:
                prime_ng = 1
                break
        if prime_ng == 0:
            cnt += 1
    elif n == 2:
        cnt += 1
print(cnt)