#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, cnt = 0;
  set<int> s;
  cin >> a;
  int arr[a], arr2[a];
  for (int i = 0; i < a; i++) {
    int x;
    cin >> x;
    s.insert(x);
  }
  set<int>::iterator it;
  int k = 0;
  for (it = s.begin(); it != s.end(); it++) {
    if (*it == 1) {
      cnt++;
      cout << 1;
      return 0;
    } else {
      arr[k] = *it;
      arr2[k] = *it;
      k++;
    }
  }
  for (int i = 0; i < k; i++) {
    int f = 0;
    if (arr2[i] != -1) {
      for (int j = 0; j < k; j++) {
        if (arr2[j] % arr[i] == 0 && arr2[j] != -1) {
          arr2[j] = -1;
          f = 1;
        }
      }
      if (f == 1) cnt++;
    }
  }
  cout << cnt << endl;
}
