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

if __name__=='__main__':
    N=int(input())
    cnt=0
    for _ in range(N):
        if is_prime(int(input())): cnt+=1
    print(cnt) def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x%2==0:
        return False
    i = 3
    while i <= x**(0.5):
        if x%i==0:
            return False
        i+=2
    return True is_prime if x == 2:
        return True
     x == 2 x 2 return True True if 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 <= x**(0.5):
        if x%i==0:
            return False
        i+=2
     i <= x**(0.5) i x**(0.5) 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 if __name__=='__main__':
    N=int(input())
    cnt=0
    for _ in range(N):
        if is_prime(int(input())): cnt+=1
    print(cnt) __name__=='__main__' __name__ '__main__' N=int(input()) N int(input()) int input() input cnt=0 cnt 0 for _ in range(N):
        if is_prime(int(input())): cnt+=1
     _ range(N) range N if is_prime(int(input())): cnt+=1
     is_prime(int(input())) is_prime int(input()) int input() input print(cnt) print cnt N=int(input()) int(input()) N def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x%2==0:
        return False
    i = 3
    while i <= x**(0.5):
        if x%i==0:
            return False
        i+=2
    return True def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x%2==0:
        return False
    i = 3
    while i <= x**(0.5):
        if x%i==0:
            return False
        i+=2
    return True is_prime cnt=0 0 cnt
def is_prime(x):
    if x == 2:
        return True
    if x < 2 or x%2==0:
        return False
    i = 3
    while i <= x**(0.5):
        if x%i==0:
            return False
        i+=2
    return True

if __name__=='__main__':
    N=int(input())
    cnt=0
    for _ in range(N):
        if is_prime(int(input())): cnt+=1
    print(cnt)