let N = Int(readLine()!)!
let A = readLine()!.split(separator: " ").map { Int($0)! }.sorted()

var dp: [Bool] = .init(repeating: true, count: A.max()! + 1)
var count = 0
for i in 0..<A.count-1 {
  for j in i+1..<A.count {
    if A[j] % A[i] == 0 {
      dp[A[j]] = false
    }
  }
}
for num in A {
  if dp[num] {
    count += 1
  }
}
print(count)