import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	}
	
	private static boolean isPrime(long n){
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	}
	
	private static boolean isPrime(long n){
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) br.readLine() br.readLine br int count = 0; count 0 String str; str while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			if(isPrime(Long.valueOf(str)))
				count++;
		} if(isPrime(Long.valueOf(str)))
				count++; isPrime(Long.valueOf(str)) isPrime Long.valueOf(str) Long.valueOf Long str count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args private static boolean isPrime(long n){
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	} isPrime {
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	} if(n < 2)
			return false;
		else if(n == 2)
			return true; n < 2 n 2 return false; false if(n == 2)
			return true; n == 2 n 2 return true; true if(n % 2 == 0)
			return false; n % 2 == 0 n % 2 n 2 0 return false; false for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false; long i = 3; long i = 3; i 3 i <= n / i i n / i n i i += 2 i += 2 i 2 if(n % i == 0)
				return false; if(n % i == 0)
				return false; n % i == 0 n % i n i 0 return false; false return true; true long n n public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	}
	
	private static boolean isPrime(long n){
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	}
	
	private static boolean isPrime(long n){
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		br.readLine();
		int count = 0;
		
		String str;
		while((str = br.readLine()) != null){
			if(isPrime(Long.valueOf(str)))
				count++;
		}
		System.out.println(count);
	}
	
	private static boolean isPrime(long n){
		if(n < 2)
			return false;
		else if(n == 2)
			return true;
		
		if(n % 2 == 0)
			return false;
		
		for(long i = 3;i <= n / i; i += 2)
			if(n % i == 0)
				return false;
		return true;
		
	}
}