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

#define NIL -1

//int array[1000000];

int array_num = 0;
int array[2000000];


int partition(int start_point, int end_point)
{
    int pivot = array[end_point];

    int small_edge = start_point;
    int large_edge = start_point;

    int swap = 0;


    for(; large_edge < end_point ; large_edge++) 
    {
        if(array[large_edge] < pivot)
        {
            swap = array[large_edge];
            array[large_edge] = array[small_edge];
            array[small_edge] = swap;

            small_edge++;

        }
    }

    swap = array[end_point];
    array[end_point] = array[small_edge];
    array[small_edge] = swap;

    return small_edge;
}

void quicksort(int start_point, int end_point)
{
    int pivot = partition(start_point, end_point);

    if(start_point < (pivot-1))
        {
            quicksort(start_point, (pivot-1));
        }

    if((pivot+1) < end_point)
        {
            quicksort((pivot+1), end_point);

        }

}

int main()
{
    int length;
    int answer;

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

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

    quicksort(0, (length-1));

    for (int i = 0; i<length; i++)
    {
        if (i<(length-1))
        {
            if (array[i] == array[i+1])
            {
                answer --;
                continue;

            }
        }

        for (int j = 0; j < i; j++)
        {
            if ((array[i]%array[j]) == 0)
            {
                answer --;
                break;
            }
        }
        
    }

    printf("%d", answer);


    return 0;
}