#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  if (a[0] == 1) {
    cout << 1;
  } else {
    vector<int> col;
    for (int i = 0; i < n; i++) {
      if (col.empty()) {
        col.push_back(a[i]);
      } else {
        bool small = true;
        for (auto &c : col) {
          if (a[i] % c == 0) {
            small = false;
            break;
          }
        }
        if (small) {
          col.push_back(a[i]);
        }
      }
    }
    cout << col.size();
  }
  return 0;
}
