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

int main(void) {
	int n;
	static int a[200000] = { 0 };
	static int b[200000] = { 0 };

	scanf("%d", &n);

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

	int flag = 0;
	int num = 0;
	for (int i = 0; i < n - 1; i++) {
		for (int j = i + 1; j < n; j++) {
			if ((a[i] % a[j]) == 0) {
				b[i] = -1;
				//			break;
			}

			if ((a[j] % a[i]) == 0) {
				b[j] = -1;
				//				break;
			}
		}

		if (b[i] == 0) {
			num++;
		}
	}

	printf("%d", num);

	return 0;
}