"use strict"
function main(arg) {
    let P = arg.trim().split("\n")[1].split(" ").map(Number).sort((a,b) => a-b)
    // P = Array.from(new Set(P));
    // let idx_list = {}
    let result = 0
    for (let i = 0; i < P.length; i++) {
        let ans = false
        for (let j = 0; j <= i; j++) {
            if (j < P.length - 1 && P[i] === P[i + 1]) {
                // console.log([P[i],P[j + 1]])
                // console.log("dddd")
                ans = true
                break
            }
            if (i === j) {
                // console.log("cccc")
                continue
            }
            if (P[i] === P[j]) {
                // console.log("bbbb")
                ans = true
                break
            }
            if (P[i] % P[j] === 0) {
                // console.log([P[i],P[j]])
                // console.log("aaaa")
                ans = true
                break
            }
        }
        if (!ans) {
            // console.log(P[i])
            result++
        }
    }
    console.log(result)
    // console.log(P)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));
