#include <stdlib.h>
#include <math.h>

int compare_int(const void *a, const void *b)
{
  return *(int*)a - *(int*)b;
}

int main()
{
  int n;
  scanf("%d", &n);
  int a[n], b[n], i, j;
  for (i = 0; i < n; i++)
  {
    scanf("%d", &a[i]);
    b[i] = 0;
  }
  qsort(a, n, sizeof(int), compare_int);
    int cnt = 0;
  for (i = 0; i < n; i++)
  {
    if (a[i] > 0)
    {
      for (j = i + 1; j < n; j++)
      {
        if (a[j] == 0)
          continue;
        if (a[j] % a[i] == 0)
          a[j] = 0;
      }
    }
  }
  qsort(a, n, sizeof(int), compare_int);
  i = 0;
  while (a[i] == 0)
  {
    cnt++;
    i++;
  }
  
/*  int flg;
  for (i = 0; i < n; i++)
  {
    flg = 0;
    if (a[i] == a[i + 1] || a[i] == a[i - 1])
      flg = 1;
    if (flg == 0)
    {
      for (j = 0; j < i; j++)
      {
        if (a[j] == a[j - 1])
          continue;
        if (b[j] == 1)
          continue;
        if (a[i] % a[j] == 0)
        {
          flg = 1;
          b[i] = 1;
          break;
        }
      }
    }
    if (flg == 0)
      cnt++;
  }
*/
  printf("%d", n - cnt);
}