def prime_number(a):
    if a ==2 : return True

    if not a==1 and not a%2==0:
        k = 3
        while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
        return True


count_pn = 0
for i in range(int(input())):
    a = int(input())
    if prime_number(a):
        count_pn += 1
print(count_pn) def prime_number(a):
    if a ==2 : return True

    if not a==1 and not a%2==0:
        k = 3
        while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
        return True prime_number if a ==2 : return True

     a ==2 a 2 if not a==1 and not a%2==0:
        k = 3
        while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
        return True not a==1 and not a%2==0 not a==1 a==1 a 1 not a%2==0 a%2==0 a%2 a 2 0 k = 3 k 3 while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
         k <= a**(1/2) k a**(1/2) a 1/2 1 2 if a % k == 0:
                return False
                break
             a % k == 0 a % k a k 0 return False False break k += 2 k 2 return True True a a count_pn = 0 count_pn 0 for i in range(int(input())):
    a = int(input())
    if prime_number(a):
        count_pn += 1 i range(int(input())) range int(input()) int input() input a = int(input()) a int(input()) int input() input if prime_number(a):
        count_pn += 1 prime_number(a) prime_number a count_pn += 1 count_pn 1 print(count_pn) print count_pn count_pn += 1 1 count_pn count_pn = 0 0 count_pn a = int(input()) int(input()) a def prime_number(a):
    if a ==2 : return True

    if not a==1 and not a%2==0:
        k = 3
        while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
        return True def prime_number(a):
    if a ==2 : return True

    if not a==1 and not a%2==0:
        k = 3
        while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
        return True prime_number
def prime_number(a):
    if a ==2 : return True

    if not a==1 and not a%2==0:
        k = 3
        while k <= a**(1/2):
            if a % k == 0:
                return False
                break
            k += 2
        return True


count_pn = 0
for i in range(int(input())):
    a = int(input())
    if prime_number(a):
        count_pn += 1
print(count_pn)