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

using namespace std;

int main(void) {

	int* A;
	int N;
	srand((unsigned)time(NULL));

	scanf("%d", &N);
	A = (int*)calloc(N, sizeof(int));
	for (int i = 0; i < N; i++) {
		//A[i] = rand() % 1000000 + 1; //test
		scanf("%d", &A[i]); //submit
		
	}
	printf("%p\n",A); //debug

	int num = 0;
	char* flag = (char*)calloc(N,sizeof(char));
	for (int i = 0; i < N; i++)
		flag[i] = 1;
	//printf("%p\n", flag); //debug

	for (int i = 0; i < N; i++) {
		for (int j = 0; j < N; j++) {
			 //printf("%d,%d\n",i,j); //debug
			if ((flag[j]!=0)&&(i != j) && (A[i] % A[j] == 0)) {
				flag[i] = 0;
				if (A[i] == A[j]) {
					flag[i] = -1;//被り
				}
				break;
			}
		}
		if (flag[i]==1)
			num++;
		//printf("%d \n", flag[i]); //debug
	}
	printf("%d\n", num);

	//printf("0"); //debug
	free(A);
	//printf("1"); //debug
	free(flag);
	//printf("2"); //debug
	return 0;
}