#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, j, count = 0, x;
  cin >> n;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    if (a[i] != 0) {
      x = a[i];
      for (j = i; j < n; j++) {
        if (a[j] != 0 && a[j] % x == 0) {
          a[j] = 0;
        }
      }
      count++;
    } else {
    }
  }
  cout << count << "\n";
}
