import java.io.*;
import java.util.*;

public class Main
{
	
	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	}
} import java.io.*; io.* java import java.util.*; util.* java public class Main
{
	
	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	}
} Main public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) int n = Integer.parseInt(br.readLine()); n Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br int ans = 0; ans 0 for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		} int i = 0; int i = 0; i 0 i< n i n i++ i++ i {
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		} {
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		} int now = Integer.parseInt(br.readLine()); now Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			} now != 1 now 1 {
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			} boolean isPrime = true; isPrime true for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				} int j = 2 ; int j = 2 ; j 2 j*j <= now j*j j j now j++ j++ j {
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				} {
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				} if(now != j && now % j == 0){
						isPrime = false;
						break;
					} now != j && now % j == 0 now != j now j now % j == 0 now % j now j 0 {
						isPrime = false;
						break;
					} isPrime = false isPrime false break; if(isPrime) ans++ ; isPrime 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 IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	}
} public class Main
{
	
	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	}
} Main
import java.io.*;
import java.util.*;

public class Main
{
	
	public static void main(String[] args)throws IOException
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		int n = Integer.parseInt(br.readLine());
		int ans = 0;
		for(int i = 0; i< n ; i++){
			int now = Integer.parseInt(br.readLine());
			if(now != 1){
				boolean isPrime = true;
				for(int j = 2 ; j*j <= now; j++)
				{
					if(now != j && now % j == 0){
						isPrime = false;
						break;
					}
				}
				if(isPrime) ans++ ;
			}
		}
		System.out.println(ans);
		
	}
}