#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int asc(const void *a, const void *b)
{
    return *(long int *)a - *(long int *)b;
}
int main()
{
    int n;
    int a[200010] = {};
    int ans = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++)
    {
        scanf("%d", a + i);
    }
    qsort(a, n, sizeof(int), asc);
    for (int i = 0; i < n; i++)
    {
        int j, l, f;
        f = 0;
        l = a[i] / 2;
        for (j = 0; j < i && a[j] <= l; j++)
        {
            if (a[i] % a[j] == 0)
            {
                f = 1;
                break;
            }
        }
        if (f == 0 && (a[i] != a[i + 1] && a[i - 1] != a[i]))
        {
            ans++;
        }
    }
    printf("%d", ans);
    return 0;
}