from math import sqrt
def isPrime(n):
    if n == 2:
        return 1
    if n == 1 or n % 2 == 0:
        return 0
    for i in range(3,int(sqrt(n)) + 1):
        if n % i == 0:
            return 0
    return 1

from sys import stdin
print(sum([isPrime(int(n))for n in stdin])) from math import sqrt def isPrime(n):
    if n == 2:
        return 1
    if n == 1 or n % 2 == 0:
        return 0
    for i in range(3,int(sqrt(n)) + 1):
        if n % i == 0:
            return 0
    return 1 isPrime if n == 2:
        return 1
     n == 2 n 2 return 1 1 if n == 1 or n % 2 == 0:
        return 0
     n == 1 or n % 2 == 0 n == 1 n 1 n % 2 == 0 n % 2 n 2 0 return 0 0 for i in range(3,int(sqrt(n)) + 1):
        if n % i == 0:
            return 0
     i range(3,int(sqrt(n)) + 1) range 3 int(sqrt(n)) + 1 int(sqrt(n)) int sqrt(n) sqrt n 1 if n % i == 0:
            return 0
     n % i == 0 n % i n i 0 return 0 0 return 1 1 n n from sys import stdin isPrime(int(n))for n in stdin for n in stdin n stdin for n in stdin isPrime(int(n)) isPrime int(n) int n print(sum([isPrime(int(n))for n in stdin])) print sum([isPrime(int(n))for n in stdin]) sum [isPrime(int(n))for n in stdin] def isPrime(n):
    if n == 2:
        return 1
    if n == 1 or n % 2 == 0:
        return 0
    for i in range(3,int(sqrt(n)) + 1):
        if n % i == 0:
            return 0
    return 1 def isPrime(n):
    if n == 2:
        return 1
    if n == 1 or n % 2 == 0:
        return 0
    for i in range(3,int(sqrt(n)) + 1):
        if n % i == 0:
            return 0
    return 1 isPrime
from math import sqrt
def isPrime(n):
    if n == 2:
        return 1
    if n == 1 or n % 2 == 0:
        return 0
    for i in range(3,int(sqrt(n)) + 1):
        if n % i == 0:
            return 0
    return 1

from sys import stdin
print(sum([isPrime(int(n))for n in stdin]))