import sys

def is_prime(x):
    if(x <= 3 and x > 1):
        return True
    elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
    i = 5
    while(i * i <= x):
        if(x % i == 0 or x % (i + 2) == 0):
            return False
        i += 6
    return True

l = []
count = 0
for input in sys.stdin:
    l.append(int(input))
for data in range(1,len(l)):
    if(is_prime(l[data]) == True):
        count += 1
print count import sys sys def is_prime(x):
    if(x <= 3 and x > 1):
        return True
    elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
    i = 5
    while(i * i <= x):
        if(x % i == 0 or x % (i + 2) == 0):
            return False
        i += 6
    return True is_prime if(x <= 3 and x > 1):
        return True
    elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
     x <= 3 and x > 1 x <= 3 x 3 x > 1 x 1 return True True elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
     x % 2 == 0 or x % 3 == 0 or x < 2 x % 2 == 0 or x % 3 == 0 x % 2 == 0 x % 2 x 2 0 x % 3 == 0 x % 3 x 3 0 x < 2 x 2 return False False i = 5 i 5 while(i * i <= x):
        if(x % i == 0 or x % (i + 2) == 0):
            return False
        i += 6
     i * i <= x i * i i i x if(x % i == 0 or x % (i + 2) == 0):
            return False
         x % i == 0 or x % (i + 2) == 0 x % i == 0 x % i x i 0 x % (i + 2) == 0 x % (i + 2) x i + 2 i 2 0 return False False i += 6 i 6 return True True x x l = [] l [] count = 0 count 0 for input in sys.stdin:
    l.append(int(input)) input sys.stdin sys stdin l.append(int(input)) l.append l append int(input) int input for data in range(1,len(l)):
    if(is_prime(l[data]) == True):
        count += 1 data range(1,len(l)) range 1 len(l) len l if(is_prime(l[data]) == True):
        count += 1 is_prime(l[data]) == True is_prime(l[data]) is_prime l[data] l data True count += 1 count 1 print l = [] [] l def is_prime(x):
    if(x <= 3 and x > 1):
        return True
    elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
    i = 5
    while(i * i <= x):
        if(x % i == 0 or x % (i + 2) == 0):
            return False
        i += 6
    return True def is_prime(x):
    if(x <= 3 and x > 1):
        return True
    elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
    i = 5
    while(i * i <= x):
        if(x % i == 0 or x % (i + 2) == 0):
            return False
        i += 6
    return True is_prime count = 0 0 count count += 1 1 count
import sys

def is_prime(x):
    if(x <= 3 and x > 1):
        return True
    elif(x % 2 == 0 or x % 3 == 0 or x < 2):
        return False
    i = 5
    while(i * i <= x):
        if(x % i == 0 or x % (i + 2) == 0):
            return False
        i += 6
    return True

l = []
count = 0
for input in sys.stdin:
    l.append(int(input))
for data in range(1,len(l)):
    if(is_prime(l[data]) == True):
        count += 1
print count
