def count_prime(array)
  count = 0
  array.each do |value|
    is_break = false
    next if value < 2
    if value == 2
      count += 1
      next
    end
    (2..value-1).each do |i|
      if (value % i).zero?
        is_break = true
        break
      end
    end
    next if is_break
    count += 1
  end
  count
end

array = []
n = gets.to_i
n.times {array << gets.to_i}

puts count_prime array

