import Foundation

let x = Int(readLine()!)!
var a = readLine()!.components(separatedBy: " ").map {Int($0)!}

//var counter = 0

a.sort()



var count = a.count
var i = 0
var j = 0
while(true) {
    
    j += 1
    if i == j {
        continue
    }
    if j == a.count {
        i += 1
        j = 0
        continue
    }
    
    if i == a.count {
        break
    }
       
//    print("i:\(i), j:\(j),a:\(a.description),count:\(count)")
    let a_i = a[i]
    let a_j = a[j]
    
    if a.count == 2 && a_i == a_j {
        a = []
        break
    }
    
    if a_j % a_i == 0 {
        a.remove(at: j)
        count -= 1
        j -= 1
    }
}

print(a.count)
