def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True


t = 0
for i in range(int(input())):
    if isPrime(int(input())):
        t += 1
print(t) def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True isPrime if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True x == 2 x 2 return True True elif (x < 2) or (x % 2 == 0):
        return False
     (x < 2) or (x % 2 == 0) x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return False False i = 3 i 3 while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
         i <= float(x) ** 0.5 i float(x) ** 0.5 float(x) float x 0.5 if x % i == 0:
                return False
             x % i == 0 x % i x i 0 return False False i += 2 i 2 return True True x x t = 0 t 0 for i in range(int(input())):
    if isPrime(int(input())):
        t += 1 i range(int(input())) range int(input()) int input() input if isPrime(int(input())):
        t += 1 isPrime(int(input())) isPrime int(input()) int input() input t += 1 t 1 print(t) print t t += 1 1 t def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True isPrime t = 0 0 t
def isPrime(x):
    if x == 2:
        return True
    elif (x < 2) or (x % 2 == 0):
        return False
    else:
        i = 3
        while i <= float(x) ** 0.5:
            if x % i == 0:
                return False
            i += 2
        return True


t = 0
for i in range(int(input())):
    if isPrime(int(input())):
        t += 1
print(t)