#include <stdio.h>

int qsort(int len, int a[len], int f, int l)
{
  int i = f;
  int j = l;
  int x = a[(f+l)/2];
  int t;
  while (1)
  {
    while(a[i] < x)
    {
      i++;
    }
    while(a[j] > x)
    {
      j--;
    }
    if (i >= j)
    {
      break;
    }
    t = a[i];
    a[i] = a[j];
    a[j] = t;
    i++;
    j--;
  }
  if (f < i - 1)
  {
    qsort(len,a,f,i-1);
  }
  if (l > j + 1)
  {
    qsort(len,a, j+1,l);
  }
}

int main()
{
  int n;
  scanf("%d",&n);
  int a[n];
  int i,j;
  i = 0;
  while (i < n)
  {
    scanf("%d",&a[i]);
    i++;
  }
  qsort(n,a,0,n-1);
  i = 0;
  int cnt;
  cnt = 0;
  while (i < n)
  {
    j = 0;
    while (j < n)
    {
      //printf("%d:%d\n",i,a[i] % a[j]);
      if (a[i] % a[j] == 0 && i != j)
      {
        break;
      }
      else if (j == n - 1)
      {
        cnt++;
      }
      else if (i - 1 == j)
      {
        cnt++;
        break;
      }
      j++;
    }
    i++;
  }
  printf("%d",cnt);
}