let n = Int(readLine()!)!
let preA = readLine()!.split(separator: " ").map { Int($0)! }
let a = preA.sorted()
var prime = Array(repeating: true, count: n)
for i in 0..<n {
  if !prime[i] {
    continue
  }
  for j in i+1..<n {
    if a[j] == a[i] {
      prime[i] = false
    }
    if a[j] % a[i] == 0 {
      prime[j] = false
    }
  }
}

print(prime.filter { $0 }.count)
