"use strict";

const main = arg => {
    const input = arg.trim().split("\n");

    const N = parseInt(input[0].split(" ")[0]);
    let A = input[1].split(" ").map(n => parseInt(n));
    A.sort((a,b) => a-b)
    A = Array.from(new Set(A))
    let cnt = 0
    let tmp = false
    for(let i = 1; i<A.length; i++){
        if(A[0] % A[i] == 0){
            tmp = true
            break
        }
    }
    if(tmp === false) cnt++
    for(let i = 1; i<A.length; i++){
        let canDivide = false
        if(i !== A.length && A[i+1] == A[i]) continue
        for(let j = 0; j<i; j++){
            if(A[i] == A[j] || A[i] % A[j] == 0){
                canDivide = true
                break
            }   
        }
        if(canDivide === false) cnt++
    }
    console.log(cnt)
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));  
