import math

def checkPrime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True

if __name__ == "__main__":
    N = input()
    cnt = 0
    for i in range(N):
        n = input()
        if checkPrime(n):
            cnt += 1
    print cnt import math math def checkPrime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True checkPrime for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
     i range(2, int(math.sqrt(n)) + 1) range 2 int(math.sqrt(n)) + 1 int(math.sqrt(n)) int math.sqrt(n) math.sqrt math sqrt n 1 if n % i == 0:
            return False
     n % i == 0 n % i n i 0 return False False return True True n n if __name__ == "__main__":
    N = input()
    cnt = 0
    for i in range(N):
        n = input()
        if checkPrime(n):
            cnt += 1
    print cnt __name__ == "__main__" __name__ "__main__" N = input() N input() input cnt = 0 cnt 0 for i in range(N):
        n = input()
        if checkPrime(n):
            cnt += 1
     i range(N) range N n = input() n input() input if checkPrime(n):
            cnt += 1
     checkPrime(n) checkPrime n cnt += 1 cnt 1 print cnt = 0 0 cnt def checkPrime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True def checkPrime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True checkPrime cnt += 1 1 cnt N = input() input() N n = input() input() n
import math

def checkPrime(n):
    for i in range(2, int(math.sqrt(n)) + 1):
        if n % i == 0:
            return False
    return True

if __name__ == "__main__":
    N = input()
    cnt = 0
    for i in range(N):
        n = input()
        if checkPrime(n):
            cnt += 1
    print cnt