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

N=int(input())
count=0
for i in range(N):
    n=int(input())
    if(prime(n)):
        count+=1
print(count) import math math def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True prime if (n==2):
        return True
     n==2 n 2 return True True if(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<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
     i<=math.sqrt(n) i math.sqrt(n) math.sqrt math sqrt n if (n%i==0):
            return False
         n%i==0 n%i n i 0 return False False i=i+2 i i+2 i 2 return True True n n N=int(input()) N int(input()) int input() input count=0 count 0 for i in range(N):
    n=int(input())
    if(prime(n)):
        count+=1 i range(N) range N n=int(input()) n int(input()) int input() input if(prime(n)):
        count+=1 prime(n) prime n count+=1 count 1 print(count) print count count+=1 1 count count=0 0 count def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True prime n=int(input()) int(input()) n N=int(input()) int(input()) N
import math
def prime(n):
    if (n==2):
        return True
    if(n<2 or n%2==0):
        return False
    i=3
    while(i<=math.sqrt(n)):
        if (n%i==0):
            return False
        i=i+2
    return True

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