#include <bits/stdc++.h>
using namespace std;
int n, a[1000], vis[1000];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  sort(a + 1, a + 1 + n);
  int pos = 1, res = 0;
  while (true) {
    if (vis[pos] == 0) {
      int min = a[pos];
      for (int i = pos + 1; i <= n; i++) {
        if (a[i] % min == 0) {
          vis[i] = 1;
        }
      }
      res++;
    }
    pos++;
    if (pos == (n + 1)) break;
  }
  cout << res << endl;
  return 0;
}
