#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, x, y;
  scanf("%d", &n);
  vector<int> v;
  vector<int> done(n + 1, 0);
  for (i = 1; i <= n; i++) {
    scanf("%d", &j);
    v.push_back(j);
  }
  sort(v.begin(), v.end());
  int counter = 0;
  for (i = 0; i < n; i++) {
    if (done[i] == 0) {
      counter++;
      for (j = i; j < n; j++) {
        if (v[j] % v[i] == 0) {
          done[j] = 1;
        }
      }
    }
  }
  cout << counter << endl;
}
