def main():
    n = int(input())
    count = 0
    for _ in range(n):
        x = int(input())
        count += isprime(x)
    print(count)

def isprime(x: int):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for y in range(3, int(x**0.5)+1, 2):
        if x % y == 0:
            return False
    return True

if __name__ == '__main__':
    main()
 def main():
    n = int(input())
    count = 0
    for _ in range(n):
        x = int(input())
        count += isprime(x)
    print(count) main n = int(input()) n int(input()) int input() input count = 0 count 0 for _ in range(n):
        x = int(input())
        count += isprime(x)
     _ range(n) range n x = int(input()) x int(input()) int input() input count += isprime(x) count isprime(x) isprime x print(count) print count def isprime(x: int):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for y in range(3, int(x**0.5)+1, 2):
        if x % y == 0:
            return False
    return True isprime if x == 2:
        return True
     x == 2 x 2 return True True if x % 2 == 0:
        return False
     x % 2 == 0 x % 2 x 2 0 return False False for y in range(3, int(x**0.5)+1, 2):
        if x % y == 0:
            return False
     y range(3, int(x**0.5)+1, 2) range 3 int(x**0.5)+1 int(x**0.5) int x**0.5 x 0.5 1 2 if x % y == 0:
            return False
     x % y == 0 x % y x y 0 return False False return True True x: int x if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n = int(input())
    count = 0
    for _ in range(n):
        x = int(input())
        count += isprime(x)
    print(count) def main():
    n = int(input())
    count = 0
    for _ in range(n):
        x = int(input())
        count += isprime(x)
    print(count) main def isprime(x: int):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for y in range(3, int(x**0.5)+1, 2):
        if x % y == 0:
            return False
    return True def isprime(x: int):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for y in range(3, int(x**0.5)+1, 2):
        if x % y == 0:
            return False
    return True isprime
def main():
    n = int(input())
    count = 0
    for _ in range(n):
        x = int(input())
        count += isprime(x)
    print(count)

def isprime(x: int):
    if x == 2:
        return True
    if x % 2 == 0:
        return False
    for y in range(3, int(x**0.5)+1, 2):
        if x % y == 0:
            return False
    return True

if __name__ == '__main__':
    main()

