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).sorted

  var x = Array.fill(N)(false)
  if (A(0) == A(1)) x(0) = true
  for (i <- 1 until N) {
    @scala.annotation.tailrec
    def loop(j: Int = 0): Unit = {
      if (A(i) % A(j) == 0) x(i) = true
      if (j + 1 < i) loop(j + 1)
    }

    loop()
  }
  println(x.count(!_))
}
