def IsPrime(x):
    if x == 1:
        return False
    p = int(pow(x, 0.5)) + 1
    i = 2
    while i <= p and i < x:
        if x % i == 0:
            return False
        else:
            i += 1
    return True

n = int(input())
c = 0
i = 0
while i < n:
    x = int(input())
    if IsPrime(x) == True:
        c += 1
    i += 1
print(c) def IsPrime(x):
    if x == 1:
        return False
    p = int(pow(x, 0.5)) + 1
    i = 2
    while i <= p and i < x:
        if x % i == 0:
            return False
        else:
            i += 1
    return True IsPrime if x == 1:
        return False
     x == 1 x 1 return False False p = int(pow(x, 0.5)) + 1 p int(pow(x, 0.5)) + 1 int(pow(x, 0.5)) int pow(x, 0.5) pow x 0.5 1 i = 2 i 2 while i <= p and i < x:
        if x % i == 0:
            return False
        else:
            i += 1
     i <= p and i < x i <= p i p i < x i x if x % i == 0:
            return False
        else:
            i += 1
     x % i == 0 x % i x i 0 return False False i += 1 i 1 return True True x x n = int(input()) n int(input()) int input() input c = 0 c 0 i = 0 i 0 while i < n:
    x = int(input())
    if IsPrime(x) == True:
        c += 1
    i += 1 i < n i n x = int(input()) x int(input()) int input() input if IsPrime(x) == True:
        c += 1
     IsPrime(x) == True IsPrime(x) IsPrime x True c += 1 c 1 i += 1 i 1 print(c) print c c += 1 1 c i += 1 1 i x = int(input()) int(input()) x n = int(input()) int(input()) n c = 0 0 c i = 0 0 i def IsPrime(x):
    if x == 1:
        return False
    p = int(pow(x, 0.5)) + 1
    i = 2
    while i <= p and i < x:
        if x % i == 0:
            return False
        else:
            i += 1
    return True def IsPrime(x):
    if x == 1:
        return False
    p = int(pow(x, 0.5)) + 1
    i = 2
    while i <= p and i < x:
        if x % i == 0:
            return False
        else:
            i += 1
    return True IsPrime
def IsPrime(x):
    if x == 1:
        return False
    p = int(pow(x, 0.5)) + 1
    i = 2
    while i <= p and i < x:
        if x % i == 0:
            return False
        else:
            i += 1
    return True

n = int(input())
c = 0
i = 0
while i < n:
    x = int(input())
    if IsPrime(x) == True:
        c += 1
    i += 1
print(c)
