import math
N = input()
pnum_count = N
for _ in range(N):
    n = input()
    if n == 2:
        continue
    if n % 2 == 0:
        pnum_count -= 1
        continue
    i = 2
    while i <= math.sqrt(n):
        if n % i == 0:
            pnum_count -= 1
            break
        i += 1
print pnum_count import math math N = input() N input() input pnum_count = N pnum_count N for _ in range(N):
    n = input()
    if n == 2:
        continue
    if n % 2 == 0:
        pnum_count -= 1
        continue
    i = 2
    while i <= math.sqrt(n):
        if n % i == 0:
            pnum_count -= 1
            break
        i += 1 _ range(N) range N n = input() n input() input if n == 2:
        continue
     n == 2 n 2 continue if n % 2 == 0:
        pnum_count -= 1
        continue
     n % 2 == 0 n % 2 n 2 0 pnum_count -= 1 pnum_count 1 continue i = 2 i 2 while i <= math.sqrt(n):
        if n % i == 0:
            pnum_count -= 1
            break
        i += 1 i <= math.sqrt(n) i math.sqrt(n) math.sqrt math sqrt n if n % i == 0:
            pnum_count -= 1
            break
         n % i == 0 n % i n i 0 pnum_count -= 1 pnum_count 1 break i += 1 i 1 print i = 2 2 i i += 1 1 i pnum_count -= 1 1 pnum_count n = input() input() n pnum_count = N N pnum_count N = input() input() N pnum_count -= 1 1 pnum_count
import math
N = input()
pnum_count = N
for _ in range(N):
    n = input()
    if n == 2:
        continue
    if n % 2 == 0:
        pnum_count -= 1
        continue
    i = 2
    while i <= math.sqrt(n):
        if n % i == 0:
            pnum_count -= 1
            break
        i += 1
print pnum_count