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 a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	}
	System.out.println(ans);

	
    }
    static boolean isPrime(int n){

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    if(n % i == 0)
		return false;
	}
	return true;
    }
}
 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 a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	}
	System.out.println(ans);

	
    }
    static boolean isPrime(int n){

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    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));
	
	int n=Integer.parseInt(br.readLine());
	int ans=0;
	
	for(int i=0;i<n;i++){
	    int a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		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 a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		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 a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	} int i=0; int i=0; i 0 i<n i n i++ i++ i {
	    int a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	} {
	    int a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	} int a=Integer.parseInt(br.readLine()); a Integer.parseInt(br.readLine()) Integer.parseInt Integer br.readLine() br.readLine br if(isPrime(a)){
		ans++;
	    } isPrime(a) isPrime a {
		ans++;
	    } ans++ ans System.out.println(ans) System.out.println System.out System System.out ans String args[] args static boolean isPrime(int n){

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    if(n % i == 0)
		return false;
	}
	return true;
    } isPrime {

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    if(n % i == 0)
		return false;
	}
	return true;
    } if(n==1)
	    return true; n==1 n 1 return true; true for (int i = 2; i * i <= n; i++) {
	    if(n % i == 0)
		return false;
	} int i = 2; int i = 2; i 2 i * i <= n i * i i i n i++ i++ i {
	    if(n % i == 0)
		return false;
	} {
	    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 int n n 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 a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	}
	System.out.println(ans);

	
    }
    static boolean isPrime(int n){

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    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));
	
	int n=Integer.parseInt(br.readLine());
	int ans=0;
	
	for(int i=0;i<n;i++){
	    int a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	}
	System.out.println(ans);

	
    }
    static boolean isPrime(int n){

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    if(n % i == 0)
		return false;
	}
	return true;
    }
} 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 a=Integer.parseInt(br.readLine());
	    if(isPrime(a)){
		ans++;
	    }
	}
	System.out.println(ans);

	
    }
    static boolean isPrime(int n){

	if(n==1)
	    return true;
	
	
	for (int i = 2; i * i <= n; i++) {
	    if(n % i == 0)
		return false;
	}
	return true;
    }
}

