#include<stdio.h>
int main(void){
  int n,a[200000],b[200000],i,j,count=0;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
    b[i]=0;
  }
  
  for(i=0;i<n;i++){
   if(b[i]==0){
    for(j=0;j<n;j++){
      if(i!=j){
        if(a[i] % a[j] == 0){
          count++;
          b[i]=1;
          break;
        }
        if(a[j] % a[i] == 0){
          b[j]=1;
        }
      }
    }
   }else{
     count++;
   }
  }
 
  printf("%d",n-count);
  return 0; 
}