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 + 5)(0)

  a.foreach { ai =>
    Range.inclusive(1, MAX / ai).foreach { t =>
      v(ai * t) = v(ai * t) + 1
    }
  }

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

