import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	}
} import java.io.File; File java.io import java.util.ArrayList; ArrayList java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	}
} Main public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	} main {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc List<Integer> list = new ArrayList<Integer>(); list new ArrayList<Integer>() int max = 0; max 0 for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		} {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		} int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc list.add(n) list.add list n if (n > max)
				max = n; n > max n max max = n max n List<Integer> primes = new ArrayList<Integer>(); primes new ArrayList<Integer>() primes.add(2) primes.add primes 2 for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		} int i = 3; int i = 3; i 3 i * i <= max i * i i i max i++ i++ i {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		} {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		} boolean is_prime = true; is_prime true for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				} int p primes if (i % p == 0) {
					is_prime = false;
					break;
				} if (i % p == 0) {
					is_prime = false;
					break;
				} i % p == 0 i % p i p 0 {
					is_prime = false;
					break;
				} is_prime = false is_prime false break; if (is_prime)
				primes.add(i); is_prime primes.add(i) primes.add primes i int ans = 0; ans 0 for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		} int n list {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		} {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		} boolean is_prime = true; is_prime true for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false; int i primes if (n != i && n % i == 0)
					is_prime = false; if (n != i && n % i == 0)
					is_prime = false; n != i && n % i == 0 n != i n i n % i == 0 n % i n i 0 is_prime = false is_prime false if (is_prime) {
				ans++;
			} is_prime {
				ans++;
			} ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	}
} public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	}
} Main
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		// Scanner sc = new Scanner(new File("test_1.txt"));
		// Scanner sc = new Scanner(new File("test_2.txt"));
		// Scanner sc = new Scanner(new File("in4.txt"));
		int N = sc.nextInt();
		List<Integer> list = new ArrayList<Integer>();
		int max = 0;
		for (int i = 0; i < N; i++) {
			int n = sc.nextInt();
			list.add(n);			
			if (n > max)
				max = n;
		}

		List<Integer> primes = new ArrayList<Integer>();
		primes.add(2);
		for (int i = 3; i * i <= max; i++) {
			boolean is_prime = true;
			for (int p : primes)
				if (i % p == 0) {
					is_prime = false;
					break;
				}
			if (is_prime)
				primes.add(i);
		}
		
		int ans = 0;
		for (int n : list) {
			boolean is_prime = true;
//			for (int i = 2; i * i < n; i++)
			for (int i : primes)
				if (n != i && n % i == 0)
					is_prime = false;
			if (is_prime) {
				ans++;
			}
		}
		System.out.println(ans);		
		
	}
}