#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  unordered_map<int, int> um;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    um[arr[i]] = 1;
  }
  sort(arr.begin(), arr.end());
  int ans = 0;
  int min_element;
  for (int i = 0; i < n; i++) {
    if (um[arr[i]] != 0) {
      um[arr[i]] = 0;
      min_element = arr[i];
      ans++;
    } else {
      continue;
    }
    for (int j = i + 1; j < n; j++) {
      if (arr[j] % arr[i] == 0) {
        um[arr[j]] = 0;
      }
    }
  }
  cout << ans << endl;
  return 0;
}
