def prime(num):
    if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
    i = 2
    while True:
        if i**2 > num:
            break
        if num%i==0:
            return False
        i += 1
    return True
n = int(raw_input())

nums = []
for _ in range(n):
    a = int(raw_input())
    nums.append(a)

ret = 0
for num in nums:
    if prime(num):
        ret += 1
print ret def prime(num):
    if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
    i = 2
    while True:
        if i**2 > num:
            break
        if num%i==0:
            return False
        i += 1
    return True prime if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
     num == 0 num 0 return False False elif num == 1:
        return False
     num == 1 num 1 return False False elif num == 2:
        return True
     num == 2 num 2 return True True i = 2 i 2 while True:
        if i**2 > num:
            break
        if num%i==0:
            return False
        i += 1
     True if i**2 > num:
            break
         i**2 > num i**2 i 2 num break if num%i==0:
            return False
         num%i==0 num%i num i 0 return False False i += 1 i 1 return True True num num n = int(raw_input()) n int(raw_input()) int raw_input() raw_input nums = [] nums [] for _ in range(n):
    a = int(raw_input())
    nums.append(a) _ range(n) range n a = int(raw_input()) a int(raw_input()) int raw_input() raw_input nums.append(a) nums.append nums append a ret = 0 ret 0 for num in nums:
    if prime(num):
        ret += 1 num nums if prime(num):
        ret += 1 prime(num) prime num ret += 1 ret 1 print a = int(raw_input()) int(raw_input()) a n = int(raw_input()) int(raw_input()) n nums = [] [] nums ret = 0 0 ret def prime(num):
    if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
    i = 2
    while True:
        if i**2 > num:
            break
        if num%i==0:
            return False
        i += 1
    return True def prime(num):
    if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
    i = 2
    while True:
        if i**2 > num:
            break
        if num%i==0:
            return False
        i += 1
    return True prime ret += 1 1 ret
def prime(num):
    if num == 0:
        return False
    elif num == 1:
        return False
    elif num == 2:
        return True
    i = 2
    while True:
        if i**2 > num:
            break
        if num%i==0:
            return False
        i += 1
    return True
n = int(raw_input())

nums = []
for _ in range(n):
    a = int(raw_input())
    nums.append(a)

ret = 0
for num in nums:
    if prime(num):
        ret += 1
print ret