def main():
    N = int(input())
    I = tuple(int(input()) for _ in range(N))

    ans = 0
    for i in I:
        if is_prime(i):
            ans += 1
    print(ans)

def is_prime(n):
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True

main() def main():
    N = int(input())
    I = tuple(int(input()) for _ in range(N))

    ans = 0
    for i in I:
        if is_prime(i):
            ans += 1
    print(ans) main N = int(input()) N int(input()) int input() input I = tuple(int(input()) for _ in range(N)) I tuple(int(input()) for _ in range(N)) tuple int(input()) int input() input ans = 0 ans 0 for i in I:
        if is_prime(i):
            ans += 1
     i I if is_prime(i):
            ans += 1
     is_prime(i) is_prime i ans += 1 ans 1 print(ans) print ans def is_prime(n):
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True is_prime if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True n < 2 n 2 return False False for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
         i range(2, n) range 2 n if i * i > n:
                break
            elif n % i == 0:
                return False
         i * i > n i * i i i n break elif n % i == 0:
                return False
         n % i == 0 n % i n i 0 return False False return True True n n main() main def main():
    N = int(input())
    I = tuple(int(input()) for _ in range(N))

    ans = 0
    for i in I:
        if is_prime(i):
            ans += 1
    print(ans) def main():
    N = int(input())
    I = tuple(int(input()) for _ in range(N))

    ans = 0
    for i in I:
        if is_prime(i):
            ans += 1
    print(ans) main def is_prime(n):
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True def is_prime(n):
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True is_prime
def main():
    N = int(input())
    I = tuple(int(input()) for _ in range(N))

    ans = 0
    for i in I:
        if is_prime(i):
            ans += 1
    print(ans)

def is_prime(n):
    if n < 2:
        return False
    else:
        for i in range(2, n):
            if i * i > n:
                break
            elif n % i == 0:
                return False
        return True

main()