times = gets.to_i
sum = 0
acc = 1
while acc <= times
  num = gets.to_i
  count = 0
  for i in 1..num
    if num % i == 0
      count += 1
    end
  end
  if count == 2
    sum += 1
  end
  acc += 1
end
puts sum