import sys
readline = sys.stdin.readline
prime = set([2])
for i in range(3, 10000, 2):
    for j in prime:
        if i % j == 0:
            break
    else:
        prime.add(i)
n = int(input())
cnt = 0
for i in (int(readline()) for _ in range(n)):
    if i in prime:
        cnt += 1
        continue
    for j in prime:
        if i % j == 0:
            break
    else:
        cnt += 1
print(cnt)
 import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline prime = set([2]) prime set([2]) set [2] 2 for i in range(3, 10000, 2):
    for j in prime:
        if i % j == 0:
            break
    else:
        prime.add(i) i range(3, 10000, 2) range 3 10000 2 for j in prime:
        if i % j == 0:
            break
    else:
        prime.add(i) j prime if i % j == 0:
            break
     i % j == 0 i % j i j 0 break prime.add(i) prime.add prime add i n = int(input()) n int(input()) int input() input cnt = 0 cnt 0 for i in (int(readline()) for _ in range(n)):
    if i in prime:
        cnt += 1
        continue
    for j in prime:
        if i % j == 0:
            break
    else:
        cnt += 1 i (int(readline()) for _ in range(n)) if i in prime:
        cnt += 1
        continue
     i in prime i prime cnt += 1 cnt 1 continue for j in prime:
        if i % j == 0:
            break
    else:
        cnt += 1 j prime if i % j == 0:
            break
     i % j == 0 i % j i j 0 break cnt += 1 cnt 1 print(cnt) print cnt cnt += 1 1 cnt readline = sys.stdin.readline sys.stdin.readline readline cnt += 1 1 cnt prime = set([2]) set([2]) prime n = int(input()) int(input()) n cnt = 0 0 cnt
import sys
readline = sys.stdin.readline
prime = set([2])
for i in range(3, 10000, 2):
    for j in prime:
        if i % j == 0:
            break
    else:
        prime.add(i)
n = int(input())
cnt = 0
for i in (int(readline()) for _ in range(n)):
    if i in prime:
        cnt += 1
        continue
    for j in prime:
        if i % j == 0:
            break
    else:
        cnt += 1
print(cnt)

