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

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

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

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

  qsort(num, n, sizeof(long long int), cmp_long_long_int);

  long long int queue[n];
  long long int pointer = 0;
  long long int count = 0;
  for (long long int i = 0; i < n; i++) {
    int flag = 1;
    for (long long int j = 0; j < pointer; j++) {
      if (!(num[i] % queue[j])) {
        flag = 0;
        break;
      }
    }

    if (!i) {
      if (!(num[i] % num[i + 1])) {
        flag = 0;
        queue[pointer] = num[i];
        pointer++;
      }
    }

    if (flag) {
      queue[pointer] = num[i];
      pointer++;
      count++;
    }
  }

  printf("%lld\n", count);

  return 0;
}
