# Prime Numbers

n = int(input())

def isPrime(a):
    print('a = ' + str(a))
    if a == 2:
        return True
    elif a < 2 or a % 2 == 0:
        return False
    else:
        i = 3
        j = a ** 0.5
        while i <= j:
            if a % i == 0:
                return False
            i += 2
        return True

primeCount = 0
for i in range(n):
    a = int(input())
    if isPrime(a) == True:
        print(str(a) + ' は素数')
        primeCount += 1

print(primeCount)

