import std.array;
import std.conv;
import std.string;
import std.algorithm;
import std.stdio;

void main() {
	auto length = readln.chomp.to!uint;
	auto a = readln.chomp.split(" ").map!(to!uint).array;
	assert(a.length == length);

	if (a.length <= 1) {
		writeln("1");
		return;
	}

	a.sort;
	auto sieve = new bool[100008];

	foreach (e;a) {
		for (uint i = e + e;i < sieve.length;i += e) {
			sieve[i] = true;
		}
	}
	for (size_t i = 1;i < a.length;++i) {
		if (a[i - 1] == a[i]) {
			sieve[a[i]] = true;
		}
	}

	uint answer;
	foreach (e;a) {
		if (!sieve[e]) {
			++answer;
		}
	}
	writeln(answer);
}
