import Foundation
func toTuple<T>(_ args: [T]) -> (T, T) { (args[0], args[1]) }
func toTuple<T>(_ args: [T]) -> (T, T, T) { (args[0], args[1], args[2]) }
func toTuple<T>(_ args: [T]) -> (T, T, T, T) { (args[0], args[1], args[2], args[3]) }
func readInts() -> [Int] { readLine()!.split(separator: " ").map { Int($0)! } }
func readDoubles() -> [Double] { readLine()!.split(separator: " ").map { Double($0)! } }
func readStrings() -> [String] { readLine()!.split(separator: " ").map { String($0) } }

let n = Int(readLine()!)!
let ai = readInts().sorted {$0 > $1}

var ans = 0
for i in 0..<n-1 {
  var count = 0
  for j in i+1..<n {
    if ai[i] % ai[j] == 0 { count += 1 }
  }
  if (count == 0) { ans += 1 }
}
if (ai[n-2] > ai[n-1]) { ans += 1 }
print(ans)