#include <stdio.h>

int main()
{
  int n;
  scanf("%d",&n);
  int a[n];
  int i,j;
  i = 0;
  while (i < n)
  {
    scanf("%d",&a[i]);
    i++;
  }
  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++;
      }
      j++;
    }
    i++;
  }
  printf("%d",cnt);
}