import java.util.Scanner;
public class Main{

private static Scanner scanner;

public static void main(String args[])
{
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
}
} import java.util.Scanner; Scanner java.util public class Main{

private static Scanner scanner;

public static void main(String args[])
{
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
}
} Main private static Scanner scanner; scanner public static void main(String args[])
{
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
} main {
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
} scanner = new Scanner(System.in) scanner new Scanner(System.in) int a = scanner.nextInt(); a scanner.nextInt() scanner.nextInt scanner int[] b = new int[a]; b new int[a] a int count = 0 count 0 pre = 0; pre 0 for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	} int i = 0; int i = 0; i 0 i < a i a i++ i++ i {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	} {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	} b[i] = scanner.nextInt() b[i] b i scanner.nextInt() scanner.nextInt scanner for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		} int j = 2; int j = 2; j 2 j <= Math.sqrt(b[i]) j Math.sqrt(b[i]) Math.sqrt Math b[i] b i j++ j++ j {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		} {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		} if(b[i]%j == 0) {
				count++;
				break;
			} b[i]%j == 0 b[i]%j b[i] b i j 0 {
				count++;
				break;
			} count++ count break; if(count == 0) {
			pre++;
		} count == 0 count 0 {
			pre++;
		} pre++ pre count = 0 count 0 System.out.println(pre) System.out.println System.out System System.out pre String args[] args public class Main{

private static Scanner scanner;

public static void main(String args[])
{
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
}
} public class Main{

private static Scanner scanner;

public static void main(String args[])
{
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
}
} Main
import java.util.Scanner;
public class Main{

private static Scanner scanner;

public static void main(String args[])
{
	scanner = new Scanner(System.in);
	int a = scanner.nextInt();
	int[] b = new int[a];
	int count = 0,pre = 0;

	for(int i = 0;i < a;i++) {
		b[i] = scanner.nextInt();
		for(int j = 2;j <= Math.sqrt(b[i]);j++) {
			if(b[i]%j == 0) {
				count++;
				break;
			}
		}
		if(count == 0) {
			pre++;
		}
		count = 0;
	}
	System.out.println(pre);
}
}
