#include <bits/stdc++.h>
using namespace std;
vector<int> deleteDoppelganger(const vector<int>& numbers) {
  vector<int> output;
  output.push_back(numbers.front());
  int last = numbers.front();
  for (int i = 1; i < numbers.size(); i++) {
    if (last != numbers[i]) {
      output.push_back(numbers[i]);
      last = numbers[i];
    }
  }
  return output;
}
int main() {
  int size;
  cin >> size;
  vector<int> number(size);
  for (int i = 0; i < size; i++) {
    cin >> number[i];
  }
  sort(number.begin(), number.end());
  vector<int> list = deleteDoppelganger(number);
  vector<bool> taken(list.size(), false);
  int counter = 0;
  for (int i = 0; i < list.size(); i++) {
    if (!taken[i]) {
      counter++;
      for (int j = 0; j < list.size(); j++) {
        if (!taken[j]) {
          if (list[j] % list[i] == 0) {
            taken[j] = true;
          }
        }
      }
    }
  }
  cout << counter << endl;
}
