import scala.io.StdIn._

object Main extends App {
  private val MAX = 2 * 100000

  val n = readInt
  val a = readLine.split(" ").map(_.toInt)
  val v = Array.fill(MAX + 1000)(0)

  for (i <- 0 until n) {
    for (multiply <- 1 until (MAX / a(i))) {
      v(a(i) * multiply) = v(a(i) * multiply) + 1
    }
  }

  val ans = a.count { ai => v(ai) == 1 }
  println(ans)
}

