#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#define ll long long
#define ull unsigned long long

int compare_smallorder(const void *a, const void *b){return *(int*)a - *(int*)b;}

int main(){
    int n,a[200002]={},b[200002]={},i,dp[1000002]={},j,ans=0,num=0;
    scanf("%d",&n);
    for (i=0; i<n; i++) scanf("%d",&a[i]);
    qsort(a, n, sizeof(a[0]), compare_smallorder);
    for (i=0; i<n-1; i++) {
        if (a[i]!=a[i+1]) {
            b[num]=a[i];num++;
        }else dp[a[i]]=1;
    }
    if (num==0) {
        printf("%d",0);
        return 0;
    }else b[num]=a[n-1];
    for (i=0; i<n; i++) {
        for (j=2; j*a[i]<=a[n-1]; j++) dp[j*a[i]]=1;
    }
    for (i=0; i<n; i++) if (dp[a[i]]==0) ans++;
    printf("%d",ans);
    return 0;
}
