import math
primenum =int(input())
ans = 0
for p in range(primenum):
    targ = int(input())
    for t in range(2,math.floor(math.sqrt(targ)) + 1):
        if targ % t == 0:
            break
    else:
        ans += 1
print(ans) import math math primenum =int(input()) primenum int(input()) int input() input ans = 0 ans 0 for p in range(primenum):
    targ = int(input())
    for t in range(2,math.floor(math.sqrt(targ)) + 1):
        if targ % t == 0:
            break
    else:
        ans += 1 p range(primenum) range primenum targ = int(input()) targ int(input()) int input() input for t in range(2,math.floor(math.sqrt(targ)) + 1):
        if targ % t == 0:
            break
    else:
        ans += 1 t range(2,math.floor(math.sqrt(targ)) + 1) range 2 math.floor(math.sqrt(targ)) + 1 math.floor(math.sqrt(targ)) math.floor math floor math.sqrt(targ) math.sqrt math sqrt targ 1 if targ % t == 0:
            break
     targ % t == 0 targ % t targ t 0 break ans += 1 ans 1 print(ans) print ans primenum =int(input()) int(input()) primenum ans += 1 1 ans ans = 0 0 ans targ = int(input()) int(input()) targ
import math
primenum =int(input())
ans = 0
for p in range(primenum):
    targ = int(input())
    for t in range(2,math.floor(math.sqrt(targ)) + 1):
        if targ % t == 0:
            break
    else:
        ans += 1
print(ans)