import math
n=int(input())
s=0

for i in range(n):
    a=int(input())
    b=math.ceil(a**0.5)
    #print(a) 
    if a%2==0:
        continue
    else:
        for j in range(3,b+1,2):
            if j==b:
                s+=1
           # elif a%j==0:
            #    break  
print(s)