#include<stdio.h>
#include<stdlib.h>
int main(void){

  int i,j,flag = 0,count = 0;
  int n;
  if(scanf("%d",&n) < 1){
    n = 1;
  }
  if(n > 200000) n = 200000;
  
  int a[n];
  
  for(i=0;i<n;i++){
    if(scanf("%d",&a[i]) < 1) a[i] = 1;
    if(a[i] >= 1000000) a[i] = 1000000;
  }
 
  for(i=0;i<n;i++){
   for(j=0;j<n;j++){
   
     if(i != j){
       if(a[i] >= a[j] && a[i] % a[j] == 0){
         flag = 1;
         break;
       }
     }
   }   
    
     if(flag==0){
      count++;
     }     
    flag = 0;
  }
  
 printf("%d",count);
  
 return 0; 
}