import static java.lang.Math.*;

import java.util.Scanner;

public class Main {
	  public static void main(String[] args) {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  }
	  } import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; import java.util.Scanner; Scanner java.util public class Main {
	  public static void main(String[] args) {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  }
	  } Main public static void main(String[] args) {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  } main {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  } int n n i i b b count count kekka=0 kekka 0 j j c; c double d; d Scanner sc=new Scanner(System.in); sc new Scanner(System.in) n=Integer.parseInt(sc.next()) n Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int a[]=new int[n+1]; a new int[n+1] n+1 n 1 for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    } i=0; i=0 i 0 i<n i n i++ i++ i {
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    } {
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    } a[i]=Integer.parseInt(sc.next()) a[i] a i Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    } i=0; i=0 i 0 i<n i n i++ i++ i {
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    } {
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    } count=0 count 0 d=sqrt(a[i]) d sqrt(a[i]) sqrt a[i] a i if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	} (int)d<d (int)d d {
    		 c=(int)d+1;
    	} c=(int)d+1 c (int)d+1 (int)d 1 {
    		 c=(int)d;
    	} c=(int)d c (int)d for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	} j=2; j=2 j 2 j<=c j c j++ j++ j {
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	} {
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	} if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		} a[i]==2 a[i] a i 2 {
	    			kekka++;
	    			
	    			break;
	    		} kekka++ kekka break; if(a[i]%j==0){
	    			count++;
	    			
	    		} a[i]%j==0 a[i]%j a[i] a i j 0 {
	    			count++;
	    			
	    		} count++ count if(count==1){
	    			
	    			break;
	    		} count==1 count 1 {
	    			
	    			break;
	    		} break; if(j==c){
		    		kekka++;
		    		
		    	} j==c j c {
		    		kekka++;
		    		
		    	} kekka++ kekka System.out.println(kekka) System.out.println System.out System System.out kekka String[] args args public class Main {
	  public static void main(String[] args) {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  }
	  } public class Main {
	  public static void main(String[] args) {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  }
	  } Main
import static java.lang.Math.*;

import java.util.Scanner;

public class Main {
	  public static void main(String[] args) {
		  int n,i,b,count,kekka=0,j,c;
		  double d;
		 
	    Scanner sc=new Scanner(System.in);
	    n=Integer.parseInt(sc.next());
	    
	    int a[]=new int[n+1];
	    for(i=0;i<n;i++){
	    	a[i]=Integer.parseInt(sc.next());
	    	
	    }
	    
	    for(i=0;i<n;i++){
	    	count=0;
	    	
	    	
    	d=sqrt(a[i]);
    	
    	if((int)d<d){
    		 c=(int)d+1;
    	}
    	else{
    		 c=(int)d;
    	}
    	
	    	for(j=2;j<=c;j++){
	    		if(a[i]==2){
	    			kekka++;
	    			
	    			break;
	    		}
	    		
	    		if(a[i]%j==0){
	    			count++;
	    			
	    		}
	    		
	    		if(count==1){
	    			
	    			break;
	    		}
	    		if(j==c){
		    		kekka++;
		    		
		    	}
	    	}
	    	
	    	
	    }
	    System.out.println(kekka);
	  }
	  }