#include <bits/stdc++.h>
const double eps = 1e-7, PI = 3.1415926;
const int N = 1e6;
using namespace std;
long long q, n, m, k, x, a[N], sum, mx = -1, mn = 1e9;
char c[N];
string s;
vector<int> vec;
map<long long, long long> M;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  sort(a, a + n);
  x = 0;
  for (int i = 0; i < n; i++) {
    if (M[a[i]] == 0) {
      x++;
      for (int j = i + 1; j < n; j++) {
        if (a[j] % a[i] == 0 && M[a[j]] == 0) {
          M[a[j]] = x;
        }
      }
    }
  }
  cout << x;
}
