n = gets.chomp.to_i
input_values = []
n.times do
  value = gets.chomp.to_i
  input_values.push(value)
end

def isprime(x)
  if x <= 1
    return false
  end
  for i in 2..(x-1)
    if x % i == 0
      return false
    else
      return true
    end
  end
end

num_of_prime = 1
for i in 0..(n-1)
  if isprime(input_values[i]) == true
    num_of_prime += 1
  end
end

puts num_of_prime