from math import sqrt
def prime(n):
    if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        i = 3
        while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
    return True

n = int(input())
c = 0
for i in range(n):
    if(prime(int(input()))):
        c += 1

print(c) from math import sqrt def prime(n):
    if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        i = 3
        while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
    return True prime if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        i = 3
        while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
     n == 2 n 2 return True True elif n < 2 or n % 2 == 0:
        return False
     n < 2 or n % 2 == 0 n < 2 n 2 n % 2 == 0 n % 2 n 2 0 return False False i = 3 i 3 while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
     i <= sqrt(n) i sqrt(n) sqrt n if n % i == 0:
                return False
             n % i == 0 n % i n i 0 return False False i += 2 i 2 return True True n n n = int(input()) n int(input()) int input() input c = 0 c 0 for i in range(n):
    if(prime(int(input()))):
        c += 1 i range(n) range n if(prime(int(input()))):
        c += 1 prime(int(input())) prime int(input()) int input() input c += 1 c 1 print(c) print c c += 1 1 c c = 0 0 c def prime(n):
    if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        i = 3
        while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
    return True def prime(n):
    if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        i = 3
        while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
    return True prime n = int(input()) int(input()) n
from math import sqrt
def prime(n):
    if n == 2:
        return True
    elif n < 2 or n % 2 == 0:
        return False
    else:
        i = 3
        while i <= sqrt(n):
            if n % i == 0:
                return False
            i += 2
    return True

n = int(input())
c = 0
for i in range(n):
    if(prime(int(input()))):
        c += 1

print(c)