#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100002];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  int val[1000] = {0};
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int p = 0;
    for (int j = i; j < n; j++) {
      if (a[j] % a[i] == 0 && val[j] == 0) {
        val[j] = 1;
        p = 1;
      }
    }
    if (p) ans++;
  }
  printf("%d\n", ans);
  return 0;
}
