#include <bits/stdc++.h>
using namespace std;
int n, a[100500], ans;
;
bool mk[100500];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  for (int i = 0; i < n; i++)
    if (!mk[i]) {
      mk[i] = 1;
      for (int j = i + 1; j < n; j++)
        if (!mk[j] && a[j] % a[i] == 0) mk[j] = 1;
      ans++;
    }
  cout << ans;
}
