#include <bits/stdc++.h>
using namespace std;
static const int maxn = 3e5 + 5;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n;
  cin >> n;
  multiset<int> ms;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    ms.insert(x);
  }
  int ans = 0;
  while (ms.empty() == false) {
    int mini = *ms.begin();
    ++ans;
    vector<int> del;
    for (int x : ms) {
      if (x % mini == 0) del.push_back(x);
    }
    for (int x : del) ms.erase(ms.find(x));
  }
  cout << ans;
}
