#include <bits/stdc++.h>

using namespace std;

int main() {
	int n;
	cin >> n;

	vector<int> vi;
	int mx = 0;

	for (int i = 0; i < n; i++) {
		int p;
		cin >> p;
		vi.push_back(p);

		mx = max(p, mx);
	}

	vector<long long> div(mx + 1);

	for (int i = 0; i < n; i++) {
		for (int j = 1; j * vi[i] <= mx; j++) {
			div[j * vi[i]]++;
		}
	}

	int c = 0;

	for (int i = 0; i < n; i++) {
		if (div[vi[i]] == 1) c++;
	}

	cout << c;
}
