import math

def isprime(z):
    if z == 2:
        return True
    
    if z < 2 or z % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(z):
        if z % i == 0:
            return False
        i += 2
    return True

if __name__ == '__main__':
    n = int(input())
    c = 0
    for _ in range(n):
        if isprime(int(input())):
            c += 1
    print (c) import math math def isprime(z):
    if z == 2:
        return True
    
    if z < 2 or z % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(z):
        if z % i == 0:
            return False
        i += 2
    return True isprime if z == 2:
        return True
    
     z == 2 z 2 return True True if z < 2 or z % 2 == 0:
        return False
     z < 2 or z % 2 == 0 z < 2 z 2 z % 2 == 0 z % 2 z 2 0 return False False i = 3 i 3 while i <= math.sqrt(z):
        if z % i == 0:
            return False
        i += 2
     i <= math.sqrt(z) i math.sqrt(z) math.sqrt math sqrt z if z % i == 0:
            return False
         z % i == 0 z % i z i 0 return False False i += 2 i 2 return True True z z if __name__ == '__main__':
    n = int(input())
    c = 0
    for _ in range(n):
        if isprime(int(input())):
            c += 1
    print (c) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input c = 0 c 0 for _ in range(n):
        if isprime(int(input())):
            c += 1
     _ range(n) range n if isprime(int(input())):
            c += 1
     isprime(int(input())) isprime int(input()) int input() input c += 1 c 1 print (c) print c def isprime(z):
    if z == 2:
        return True
    
    if z < 2 or z % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(z):
        if z % i == 0:
            return False
        i += 2
    return True def isprime(z):
    if z == 2:
        return True
    
    if z < 2 or z % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(z):
        if z % i == 0:
            return False
        i += 2
    return True isprime c = 0 0 c n = int(input()) int(input()) n c += 1 1 c
import math

def isprime(z):
    if z == 2:
        return True
    
    if z < 2 or z % 2 == 0:
        return False
    i = 3
    while i <= math.sqrt(z):
        if z % i == 0:
            return False
        i += 2
    return True

if __name__ == '__main__':
    n = int(input())
    c = 0
    for _ in range(n):
        if isprime(int(input())):
            c += 1
    print (c)
