#include <stdio.h>
#define SIZE 200005

int med(int x, int y, int z){
    if(x < y){
        if(y < z)return y; else if(z < x)return x;else return z;
    }else{
        if(x < z)return x; else if(z < y)return y; else return z;
    }
}

void quicksort(int a[], int left, int right){
    if(left < right){
        int i = left, j = right, pivot = med(a[i], a[i+(j-i)/2], a[j]), tmp;
        while(1){
            while(a[i] < pivot)i++;
            while(pivot < a[j])j--;
            if(i >= j)break;
            tmp = a[i]; a[i] = a[j]; a[j] = tmp;
            i++; j--;
        }
        quicksort(a, left, i-1);
        quicksort(a, j+1, right);
    }
}

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