n=int(input())
nums=[]
for i in range(n):
    nums.append(int(input()))
count=0
for i in range(n):
    j=nums[i]-2
    while(0):
        if nums[i]%j == 0:
            break
        if j == 2:
            counter+=1
            break
        j-=1
print(count)
