import scala.io.StdIn._

object Main extends App {
  val n = readInt
  val a = readLine.split(" ").map(_.toInt).sorted

  val ans = Range(0, n).count { i =>
    def divisibleOnLeft = Range(0, i).exists { j =>
      a(i) % a(j) == 0
    }
    def nextValueEqual = i < n - 1 && a(i) == a(i + 1)

    !divisibleOnLeft && !nextValueEqual
  }

  println(ans)
}

