#include <stdio.h>
#define LIM 1000005
#define SIZE 200005

int main(void){
    int n, i, j, t, count[LIM] = {0}, max = 0, c = 0, a[SIZE], ans = 0;
    scanf("%d", &n);
    for(i = 0; i < n; i++){
        scanf("%d", &t);
        count[t]++;
        if(max < t)max = t;
    }
    for(i = 1; i <= max; i++){
        if(count[i] != 0){
            a[c] = i;
            c++;
        }
    }
    for(i = c-1; i >= 1; i--){
        for(j = 0; j <= i-1; j++){
            if(a[i]%a[j] == 0){
                ans++;
                break;
            }
        }
    }
    printf("%d", ans);
    return 0;
}