'use strict';

function Main(input) {
    let tmp = input.trim().split('\n');
    const N = Number(tmp[0]);
    const A = tmp[1].split(' ').map((v) => Number(v)).sort((a, b) => a - b);
    // console.log(N, A);

    let count = 0;

    let before = A[0];
    for (let i = 1; i < N; i++) {
        if (A[i] === before) {
            continue;
        }
        let flag = 1;
        for (let j = 0; j < i; j++) {
            if (A[i] % A[j] === 0) {
                flag = 0;
                break;
            }
        }
        if (flag) {
            count++;
        }

        before = A[i];
    }

    if (A[0] !== A[1]) {
        count++;
    }

    console.log(String(count));
    return;
}
Main(require('fs').readFileSync('/dev/stdin', 'utf8'));

// Main(`5
// 24 11 8 3 16`);
// Main(`4
// 5 5 5 5`);
// Main(`10
// 33 18 45 28 8 19 89 86 2 4`);
