#include <stdbool.h>
#include <stdio.h>
int a[200000];
int cnt[1000001] = {0};
int main() {
	int n;
	scanf("%d", &n);
	int ans = 0;
	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
		cnt[a[i]]++;
	}
	if (n == 1) {
		printf("1\n");
		return 0;
	}
	for (int i = 0; i < n; i++) {
		bool ok = true;
		int x = a[i];
		for (int j = 1; j * j <= x; j++) {
			if (x % j == 0) {
				if (cnt[j] >= 1) {
					ok = false;
					break;
				}
				if (j == 1) {
					if (cnt[x / j] >= 2) {
						ok = false;
						break;
					}
				} else {
					if (cnt[x / j] >= 1) {
						ok = false;
						break;
					}
				}
			}
		}
		if (ok) {
			//printf("%d\n", x);
			ans++;
		}
	}
	printf("%d\n", ans);
	return 0;
}