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