def judge(int):
    if int == 2:return 1
    elif int <= 1 :return 0
    i = 2
    while i*i <= int:
        if int % i == 0:return 0 
        i += 1
    return 1



n = input()
count = 0
for i in range(n):
    if judge(input()) == 1:
        count+=1
print count def judge(int):
    if int == 2:return 1
    elif int <= 1 :return 0
    i = 2
    while i*i <= int:
        if int % i == 0:return 0 
        i += 1
    return 1 judge if int == 2:return 1
    elif int <= 1 :return 0
     int == 2 int 2 elif int <= 1 :return 0
     int <= 1 int 1 i = 2 i 2 while i*i <= int:
        if int % i == 0:return 0 
        i += 1
     i*i <= int i*i i i int if int % i == 0:return 0 
         int % i == 0 int % i int i 0 i += 1 i 1 return 1 1 int int n = input() n input() input count = 0 count 0 for i in range(n):
    if judge(input()) == 1:
        count+=1 i range(n) range n if judge(input()) == 1:
        count+=1 judge(input()) == 1 judge(input()) judge input() input 1 count+=1 count 1 print n = input() input() n count+=1 1 count def judge(int):
    if int == 2:return 1
    elif int <= 1 :return 0
    i = 2
    while i*i <= int:
        if int % i == 0:return 0 
        i += 1
    return 1 def judge(int):
    if int == 2:return 1
    elif int <= 1 :return 0
    i = 2
    while i*i <= int:
        if int % i == 0:return 0 
        i += 1
    return 1 judge count = 0 0 count
def judge(int):
    if int == 2:return 1
    elif int <= 1 :return 0
    i = 2
    while i*i <= int:
        if int % i == 0:return 0 
        i += 1
    return 1



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