#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, x, count = 0;
  cin >> n;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    if (x == 1) {
      cout << 1;
      return;
    }
    a.push_back(x);
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n; ++i) {
    if (a[i] == 0) continue;
    for (int j = i + 1; j < n; ++j) {
      if (a[j] == 0)
        continue;
      else if (a[j] % a[i] == 0)
        a[j] = 0;
    }
    ++count;
  }
  cout << count;
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  solve();
}
