#include <stdio.h>

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

  for(int i = 0; i < n; i++){
    for(int k = 0; k < n; k++){
      if(A[i] % A[k] == 0){
        count += 1;
        if(count == 2){
          count = 0;
          break;
        }
      }
    }
    if(count == 1){
      ans += 1;
    }
    count = 0;
  }

  printf("%d", ans);
  return 0;
}
