numberOfInput=int(input())
primeNumbers=0

while numberOfInput>0:
    researchNumber=int(input())
    if researchNumber==1:
        pass
    else:
        for devidedBy in range(1,researchNumber+1):
            if researchNumber%devidedBy==0 and devidedBy!=1 and devidedBy!=researchNumber:
                break
            elif researchNumber%devidedBy==0 and devidedBy==researchNumber:
                primeNumbers+=1
    numberOfInput-=1

print(primeNumbers)
