#include <bits/stdc++.h>
using namespace std;
long long i, n, f[100000], a[100000], ans, j;
int main() {
  cin >> n;
  for (i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (i = 0; i < n; i++) f[i] = 0;
  for (i = 0; i < n; i++)
    if (f[i] == 0) {
      ans++;
      for (j = i; j < n; j++)
        if (a[j] % a[i] == 0) f[j] = 1;
    }
  cout << ans;
  return 0;
}
