def isPrime(n):
    i = 2
    while i*i <= n:
        if n % i == 0:
            return False
        i += 1
    return True
    
n = int(input())
ans = 0

for i in range(n):
    t = int(input())
    if isPrime(t):
        ans += 1
print(ans) def isPrime(n):
    i = 2
    while i*i <= n:
        if n % i == 0:
            return False
        i += 1
    return True
     isPrime i = 2 i 2 while i*i <= n:
        if n % i == 0:
            return False
        i += 1
     i*i <= n i*i i i n if n % i == 0:
            return False
         n % i == 0 n % i n i 0 return False False i += 1 i 1 return True True n n n = int(input()) n int(input()) int input() input ans = 0 ans 0 for i in range(n):
    t = int(input())
    if isPrime(t):
        ans += 1 i range(n) range n t = int(input()) t int(input()) int input() input if isPrime(t):
        ans += 1 isPrime(t) isPrime t ans += 1 ans 1 print(ans) print ans ans += 1 1 ans ans = 0 0 ans n = int(input()) int(input()) n def isPrime(n):
    i = 2
    while i*i <= n:
        if n % i == 0:
            return False
        i += 1
    return True
     def isPrime(n):
    i = 2
    while i*i <= n:
        if n % i == 0:
            return False
        i += 1
    return True
     isPrime t = int(input()) int(input()) t
def isPrime(n):
    i = 2
    while i*i <= n:
        if n % i == 0:
            return False
        i += 1
    return True
    
n = int(input())
ans = 0

for i in range(n):
    t = int(input())
    if isPrime(t):
        ans += 1
print(ans)