s=[]
a=[int(i) for i in range(2,100000000)]
while a!=[]:
    t=a[0]
    a=[i for i in a if i % t !=0]
    s.append(t)

n=int(input())
x=0
for i  in range(n):
    if int(input()) in s:
        x+=1
print(x)