

def divisor(num):
    for i in range(2, num):
        if num % 2 == 0 and k != 2:
            continue

        if num % i == 0:
            return True

    return False



N = input()
cnt = 0
for num in int(input()):
    if divisor(num):
        cnt = cnt+1
        
print(cnt)
