#include <math.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define PI acos(-1)
typedef unsigned long long int ull;
typedef long long int ll;
typedef long double ld;

/*
 * 素数 prime なら 1 を返す
*/
int isPrime(int n) {
  int sqrtn;

  sqrtn = (int)sqrt((double)n);
  if (n < 2) {
    return (0);
  } else if (n == 2) {
    return (1);
  }

  for (int i = 2; i <= sqrtn + 1; i++) {
    if (n % i == 0) {
      return (0);
    }
  }
  return (1);
}

int compare_base(const void *b, const void *f) {
  return (*(int *)b - *(int *)f);
}

int main(void) {
  /* 標準入力フラグ */
  int   scan;

  /* 数入力 */
  int    answer;
  int    n;
  int    *a;
  answer = 0;
  scan = scanf("%d", &n);
  a = (int *)malloc(sizeof(int) * n);
  for (int i = 0; i < n; i++) {
    scan = scanf("%d", &a[i]);
  }

  int   *result;
  result = (int *)malloc(sizeof(int) * n);
  /* プログラムを書く */
  qsort(a, n, sizeof(int), compare_base);

  for (int i = 0; i < n; i++) {
    result[i] = 1;
    if ((i == 0 && a[i] == a[i + 1]) || (i >= 1 && i < n - 1 && (a[i] == a[i - 1] || a[i] == a[i + 1]))) {
      result[i] = 0;
    } else {
      for (int j = 0; j < i; j++) {
        if (a[i] % a[j] == 0) {
          result[i] = 0;
        }
      }
    }
  }

  for (int i = 0; i < n; i++) {
    answer += result[i];
  }
  printf("%d", answer);

  return (0);
}

