#include<stdio.h>
#include<stdlib.h>

typedef long long ll;

int max(int a, int b){
  if(a > b) return a;
  else return b;
}
int min(int a, int b){
  if(a < b) return a;
  else return b;
}

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


int main(){

  int n;
  scanf("%d",&n);

  int a[n];
  for(int i = 0; i < n; ++i){
    scanf("%d",a+i);
  }

  qsort(a,n,sizeof(int),sort);
  int ans = 0;

  int flag;
  for(int i = 0; i < n; ++i){
    flag = 0;
    if(i == 0){
      if(a[i+1] == a[i]) continue;
    }else if(i == n-1){
      if(a[i-1] == a[i]) continue;
    }else{
      if(a[i+1] == a[i] || a[i-1] == a[i]) continue;
    }

    for(int j = i+1; j < n; ++j){
      if(a[i] % a[j] == 0){
        flag = 1;
        break;
      }
    }
    if(flag == 0) ans ++;
  }

  printf("%d",ans);

  return 0;
}
