import java.util.Scanner;

/**
 * 
 */

/**
 * @author kawakami
 *
 */
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		Scanner as = new Scanner(System.in);
		
		int n = 0;
		int i = 0;
		int j = 0;
		int count = 0;
		int gre[];
		int pnum[];
		
		n = Integer.parseInt(as.next());
		
		pnum = new int[n];
		gre = new int[n];
		
		for(i=0;i<n;i++){
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		}
		
		for(i=0;i<n;i++){
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		}
		
		sb.append(count);
		System.out.println(sb.toString());

	}

} import java.util.Scanner; Scanner java.util class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		Scanner as = new Scanner(System.in);
		
		int n = 0;
		int i = 0;
		int j = 0;
		int count = 0;
		int gre[];
		int pnum[];
		
		n = Integer.parseInt(as.next());
		
		pnum = new int[n];
		gre = new int[n];
		
		for(i=0;i<n;i++){
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		}
		
		for(i=0;i<n;i++){
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		}
		
		sb.append(count);
		System.out.println(sb.toString());

	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		Scanner as = new Scanner(System.in);
		
		int n = 0;
		int i = 0;
		int j = 0;
		int count = 0;
		int gre[];
		int pnum[];
		
		n = Integer.parseInt(as.next());
		
		pnum = new int[n];
		gre = new int[n];
		
		for(i=0;i<n;i++){
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		}
		
		for(i=0;i<n;i++){
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		}
		
		sb.append(count);
		System.out.println(sb.toString());

	} main {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		Scanner as = new Scanner(System.in);
		
		int n = 0;
		int i = 0;
		int j = 0;
		int count = 0;
		int gre[];
		int pnum[];
		
		n = Integer.parseInt(as.next());
		
		pnum = new int[n];
		gre = new int[n];
		
		for(i=0;i<n;i++){
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		}
		
		for(i=0;i<n;i++){
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		}
		
		sb.append(count);
		System.out.println(sb.toString());

	} StringBuilder sb = new StringBuilder(); sb new StringBuilder() Scanner as = new Scanner(System.in); as new Scanner(System.in) int n = 0; n 0 int i = 0; i 0 int j = 0; j 0 int count = 0; count 0 int gre[]; gre int pnum[]; pnum n = Integer.parseInt(as.next()) n Integer.parseInt(as.next()) Integer.parseInt Integer as.next() as.next as pnum = new int[n] pnum new int[n] n gre = new int[n] gre new int[n] n for(i=0;i<n;i++){
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		} {
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		} pnum[i] = Integer.parseInt(as.next()) pnum[i] pnum i Integer.parseInt(as.next()) Integer.parseInt Integer as.next() as.next as gre[i] = (int) Math.sqrt(pnum[i]) gre[i] gre i (int) Math.sqrt(pnum[i]) Math.sqrt Math pnum[i] pnum i for(i=0;i<n;i++){
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		} i=0; i=0 i 0 i<n i n i++ i++ i {
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		} {
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		} for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			} j=2; j=2 j 2 j<=gre[i]+1 j gre[i]+1 gre[i] gre i 1 j++ j++ j {
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			} {
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			} if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				} j == gre[i]+1 && pnum[i] != 1 j == gre[i]+1 j gre[i]+1 gre[i] gre i 1 pnum[i] != 1 pnum[i] pnum i 1 {
					
					//System.out.println(pnum[i]);
					count++;
					
				} count++ count if(pnum[i] % j == 0){
					
					break;
					
				} pnum[i] % j == 0 pnum[i] % j pnum[i] pnum i j 0 {
					
					break;
					
				} break; sb.append(count) sb.append sb count System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args
import java.util.Scanner;

/**
 * 
 */

/**
 * @author kawakami
 *
 */
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		StringBuilder sb = new StringBuilder();
		Scanner as = new Scanner(System.in);
		
		int n = 0;
		int i = 0;
		int j = 0;
		int count = 0;
		int gre[];
		int pnum[];
		
		n = Integer.parseInt(as.next());
		
		pnum = new int[n];
		gre = new int[n];
		
		for(i=0;i<n;i++){
			
			pnum[i] = Integer.parseInt(as.next());
			gre[i] = (int) Math.sqrt(pnum[i]);
			//System.out.println("moto:"+pnum[i]);
			//System.out.println("root:"+gre[i]);
			
		}
		
		for(i=0;i<n;i++){
			for(j=2;j<=gre[i]+1;j++){
				
				if(j == gre[i]+1 && pnum[i] != 1){
					
					//System.out.println(pnum[i]);
					count++;
					
				}
				if(pnum[i] % j == 0){
					
					break;
					
				}
				
			}
		
		}
		
		sb.append(count);
		System.out.println(sb.toString());

	}

}