#include<stdio.h>
#include<string.h>

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

int main(void){
  int n;
  scanf("%d",&n);

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

  qsort(a,n,sizeof(int),down);

  int flag = 0 ,count = 0;
  for(int i = 0;i < n-1;i ++){
    for(int j = i +1;j < n;j ++){
      if(a[i]%a[j] == 0){
        flag = 1;
        j += n+1;
      }
    }
    if(flag == 0){
      count ++;
    }
    flag = 0;
  }
  
  if(a[n-1] != a[n-2]){
    count ++;
  }
  
  printf("%d\n",count);

  return 0;
}