let n = Int(readLine()!)!
let aArray = readLine()!.split(separator: " ").map{Int($0)!}.sorted()
let duplicate = aArray.reduce(into: [Int: Int]()){
    $0[$1] = ($0[$1] != nil ? $0[$1]!+1 : 1)
}
let aArrayNoDuplicate = [Int](Set<Int>(aArray))
var count = 0
let num = aArrayNoDuplicate.count
outer: for i in 0..<num {
    if aArrayNoDuplicate[i] > 1 {
        continue
    }
    for j in 0..<i {
        if i == j {
            continue
        } else if aArray[j] > aArray[i] {
            break
        } else if aArray[i] % aArray[j] == 0 {
            continue outer
        }
    }
    count += 1
}
print(count)
