#include <bits/stdc++.h>
int main(int argc, char* argv[]) {
  char input[1024];
  int lines = atoi(fgets(input, sizeof(input), stdin));
  int* array = new int[lines];
  for (int i = 0; i < lines; i++) {
    array[i] = atoi(fgets(input, sizeof(input), stdin));
  }
  for (int i = 0; i < lines; i++) {
    if (array[i] != -1) {
      for (int j = 0; j < lines; j++) {
        if (i != j && array[j] % array[i] == 0) {
          array[j] = -1;
        }
      }
    }
  }
  int num = 0;
  for (int i = 0; i < lines; i++) {
    if (array[i] > 0) {
      num++;
    }
  }
  printf("%d\n", num);
  return 0;
}
