#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
bool vis[N];
int main() {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    int t;
    cin >> t;
    vis[t] = 1;
  }
  int cnt = 0;
  for (int i = 1; i <= 100; i++) {
    if (vis[i]) {
      for (int j = i; j <= 100; j += i) vis[j] = 0;
      cnt++;
    }
  }
  cout << cnt << '\n';
  return 0;
}
