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