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