import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val N = sc.nextInt
  val A = Array.fill(N)(sc.nextInt)

  val x = Array.fill(N)(true)
  for (i <- 0 until N) {
    for (j <- i + 1 until N) {
      if (A(i) % A(j) == 0) {
        x(i) = false
      }
    }
  }
  val z = x.count(x => x) - 1
  println(z)
}
