#include<stdio.h>
int main(){
   int N,i,j;
   scanf("%d",&N);
   int A[N];
   int judg;
   int count=0;
   for(i=0;i<N;i++){
      scanf("%d",&A[i]);
   }
   for(i=0;i<N;i++){
      judg=0;
      for(j=0;j<N;j++){
         if(A[i]%A[j]==0){
            judg++;
         }
      }
      if(judg==1){
         count++;
      }
   }
   printf("%d",count);
   return 0;
}
      