object Main {
  def main(args: Array[String]): Unit = {
    import scala.io.StdIn.readLine
    val Array(datN) = readLine.split(" ").map(_.toInt)
    val datA = readLine.split(" ").map(_.toInt).sorted

    def removeMultiplied(res: Array[Int], i: Int, dat: Array[Int]): Array[Int] = {
      if (dat.isEmpty) res
      else {
        val res_ = if (dat.head % i != 0) res ++ Array(dat.head) else res
        removeMultiplied (res_, i, dat.tail)
      }
    }
    def countAns(res: Int, dat: Array[Int]): Int = {
      if (dat.isEmpty) res
      else {
        val res_ = if((dat.length >= 2) && (dat(0) == dat(1))) res else res + 1
        countAns(res_, removeMultiplied(Array(), dat.head, dat.tail))
      }
    }
    val ans = countAns(0, datA)
    println(ans)
  }
}
