import scala.io.StdIn._
import scala.math._

object Main extends App with StdInHelper {
  val n = readInt
  val as = readInts.sorted

  var res = 0

  for (i <- (0 to as.length - 1).reverse) {
    val b = new scala.util.control.Breaks
    b.breakable {
      for (j <- (0 to as.length - 1).reverse) {
        if (i != j && as(i) % as(j) == 0) {
          b.break
        }
      }
      res += 1
    }
  }
  println(res)
}

trait StdInHelper {
  def readStrings = {
    val l = readLine
    if (l == "") Array.empty[String]
    else l.split(" ")
  }
  def readInts = readStrings.map(_.toInt)
  def readLongs = readStrings.map(_.toLong)
  def readDoubles = readStrings.map(_.toDouble)
  def readBigInts = readStrings.map(BigInt.apply(_))
  def readBigDecimals = readStrings.map(BigDecimal.apply(_))
}
