#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
#define ll long long int

int comp(const void *a, const void *b)
{ //昇順
    return *(int *)a - *(int *)b;
}

int main(void)
{
    int n, i, j, c = 0;
    int a[200006];
    scanf("%d", &n);
    for (i = 0; i < n; i++)
    {
        scanf("%d", &a[i]);
    }
    if (n == 1)
    {
        printf("1\n");
        return 0;
    }

    qsort(a, n, sizeof(int), comp);
    int lim, fl = 1;
    if (a[0] != a[1])
        c++;
    if (a[0] == 1)
    {
        printf("%d\n", c);
        return 0;
    }

    for (i = 1; i < n; i++)
    {
        lim = a[i] >> 1;
        for (j = 0; j < i; j++)
        {
            if ((a[i] & 1) != (a[j] & 1))
                continue;
            if (a[j] > lim && a[j] != a[i])
            {
                break;
            }
            if (a[i] % a[j] == 0)
            {
                fl = 0;
                break;
            }
        }
        c += fl;
        fl = 1;
    }
    printf("%d\n", c);
    return 0;
}