import java.util.Scanner

import scala.io.StdIn._
object Main extends App {

  def read(): (Int, Array[Int]) = {
    val sc: Scanner = new Scanner(System.in)
    val n = sc.nextInt()
    val arr = Array.fill(n)(sc.nextInt)
    sc.close()
    (n, arr)
  }

  def solve(): Int = {
    val (_, arr) = read()
    arr.zipWithIndex.foldLeft(0) { case (acc, (num, index)) =>
      if(canDivide(num, index, arr)) acc else acc + 1
    }
  }

  def canDivide(num: Int, index: Int, nums: Array[Int]): Boolean = {
    ((0 until index) ++ (index+1 until nums.length)).foreach { i =>
      if(num % nums(i) == 0 && num / nums(i) != 0) return true
    }
    false
  }

  println(solve())

}
