#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 500;
const long long mod = 1e9 + 7;
const long long INF = 1LL << 57;
const int LN = 22;
long long n, m, u, v, k, t, q, x, d, p, a, b, c, s, e, g;
int arr[N];
int col[N];
int color = 0;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> arr[i];
  sort(arr + 1, arr + 1 + n);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j < i; ++j) {
      if (arr[i] % arr[j] == 0) col[i] = col[j];
    }
    if (col[i] == 0) col[i] = ++color;
  }
  cout << color << endl;
}
