#include<stdio.h>
#include<string.h>

#define OK 1
#define NIL -1

int array[2000000];
int array_index[2000000];

int main()
{
    int length;
    int answer;
    int max_num = 0;

    scanf("%d", &length);
    answer = 0;

    for (int i = 0; i<length; i++)
    {
        scanf("%d", &array_index[i]);
        if (array_index[i] > max_num)
        {
            max_num = array_index[i];
        }
    }

    for (int i = 1; i<= max_num; i++)
    {
        array[i] = OK;
    }

    for (int i = 0; i<length; i++)
    {
        int j = array_index[i]; 

        while (j <= max_num)
        {
            array[j] += NIL;
            j += array_index[i];
        }
        
    }

    for (int i = 0; i<length; i++)
    {
        if (array[array_index[i]] >= 0)
        {
            answer ++;
        }
    }

    printf("%d", answer);


    return 0;
}