#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
int n, a[N];
bool use[N];
int main() {
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  sort(a + 1, a + n + 1);
  int tot = 0, ans = 0;
  while (tot != n) {
    int x;
    for (int i = 1; i <= n; ++i)
      if (!use[i]) {
        x = a[i];
        break;
      }
    for (int i = 1; i <= n; ++i)
      if (!use[i] && a[i] % x == 0) use[i] = 1, tot++;
    ans++;
  }
  cout << ans << endl;
}
