import math
Num = input()
N = [input() for _ in range(Num)]
pnum_count = Num
for n in N:
    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 Num = input() Num input() input input() for _ in range(Num) for _ in range(Num) _ range(Num) range Num for _ in range(Num) input() input N = [input() for _ in range(Num)] N [input() for _ in range(Num)] pnum_count = Num pnum_count Num for n in N:
    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 n N 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 += 1 1 i Num = input() input() Num N = [input() for _ in range(Num)] [input() for _ in range(Num)] N i = 2 2 i pnum_count -= 1 1 pnum_count pnum_count -= 1 1 pnum_count pnum_count = Num Num pnum_count
import math
Num = input()
N = [input() for _ in range(Num)]
pnum_count = Num
for n in N:
    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