#include <bits/stdc++.h>
const int MAX_N = 10000;
int main() {
  int n = 0;
  int numbers[MAX_N] = {0};
  std::cin >> n;
  int max = 0;
  for (int i = 0; i < n; i++) {
    std::cin >> numbers[i];
    if (numbers[i] > max) {
      max = numbers[i];
    }
  }
  int count = n;
  for (int i = 2; i < (max / 2); i++) {
    for (int j = 0; j < n; j++) {
      if (numbers[j] < 0) {
        continue;
      }
      for (int k = i; k <= max; k += k) {
        if (numbers[j] == k) {
          numbers[j] = -1;
          count--;
        }
      }
    }
  }
  std::cout << count << std::endl;
  return 0;
}
