#include <stdio.h>
#include <stdlib.h>
#include <math.h>

int compare_int(const void *a, const void *b)
{
	return *(int*)a - *(int*)b;
}

int main(void)
{
	int N, i, j, root, ans;
	scanf("%d\n", &N);
	int num[N];
	int flag[N];
	for (i = 0; i < N; i++)
	{
		scanf("%d", &num[i]);
		flag[i] = 1;
	}
	qsort(num, N, sizeof(int), compare_int);

	root = sqrt(num[N - 1]) + 1;

	i = 0;
	while (i < root)
	{
		j = i + 1;
		if (num[i] == num[j])
		{
			flag[i] = 0;
			flag[j] = 0;
			i++;
			continue;
		}

		if (0 < i && num[i - 1] != num[i] && flag[i] == 0)
		{
			i++;
			continue;
		}

		while (j < N)
		{
			if (num[j] % num[i] == 0)
				flag[j] = 0;
			j++;
		}
		i++;
	}

	i = 0;
	ans = 0;
	while (i < N)
		if (flag[i++] == 1)
			ans++;
	printf("%d\n", ans);
	return (0);
}