#!/usr/bin/env python
# coding: utf-8

def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True


n = int(input())
listdata = []
for i in range(n):
    listdata.append(int(input()))

n=0
for data in listdata:
    ch = check_pn(data)
    n += ch

print (n)

 def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True check_pn if (num <2):
        return False
    elif (num==2):
        return True

     num <2 num 2 return False False elif (num==2):
        return True

     num==2 num 2 return True True if (num%2 == 0):
        return False
     num%2 == 0 num%2 num 2 0 return False False i = 3 i 3 while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

     i <= num/i i num/i num i if num % i == 0:
            return False
         num % i == 0 num % i num i 0 return False False i += 2 i 2 return True True num num n = int(input()) n int(input()) int input() input listdata = [] listdata [] for i in range(n):
    listdata.append(int(input())) i range(n) range n listdata.append(int(input())) listdata.append listdata append int(input()) int input() input n=0 n 0 for data in listdata:
    ch = check_pn(data)
    n += ch data listdata ch = check_pn(data) ch check_pn(data) check_pn data n += ch n ch print (n) print n n += ch ch n def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True check_pn listdata = [] [] listdata n = int(input()) int(input()) n n=0 0 n ch = check_pn(data) check_pn(data) ch
#!/usr/bin/env python
# coding: utf-8

def check_pn(num):
    if (num <2):
        return False
    elif (num==2):
        return True

    if (num%2 == 0):
        return False
    i = 3
    while (i <= num/i):
        if num % i == 0:
            return False
        i += 2

    return True


n = int(input())
listdata = []
for i in range(n):
    listdata.append(int(input()))

n=0
for data in listdata:
    ch = check_pn(data)
    n += ch

print (n)


