import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    }
    
    public static int isprime(int x)
    {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    }
} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main(String[] args)
    {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    }
    
    public static int isprime(int x)
    {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    }
} Main public static void main(String[] args)
    {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    } main {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    } Scanner In = new Scanner(System.in); In new Scanner(System.in) int n n count = 0; count 0 do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000); 1 >= n && n >= 10000 1 >= n 1 n n >= 10000 n 10000 {
		n = In.nextInt();
	    } n = In.nextInt() n In.nextInt() In.nextInt In int []a = new int[n]; a new int[n] n for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    } {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    } do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8)); a[i] <= 2 && a[i] >= Math.pow(10,8) a[i] <= 2 a[i] a i 2 a[i] >= Math.pow(10,8) a[i] a i Math.pow(10,8) Math.pow Math 10 8 {
			a[i] = In.nextInt();
		} a[i] = In.nextInt() a[i] a i In.nextInt() In.nextInt In if((isprime(a[i])) == 1)
		   count++; (isprime(a[i])) == 1 (isprime(a[i])) isprime a[i] a i 1 count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public static int isprime(int x)
    {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    } isprime {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    } if(x == 2)
	    return 1; x == 2 x 2 return 1; 1 if(x < 2 || x % 2 == 0)
	    return 0; x < 2 || x % 2 == 0 x < 2 x 2 x % 2 == 0 x % 2 x 2 0 return 0; 0 int j = 3; j 3 while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    } j <= Math.sqrt(x) j Math.sqrt(x) Math.sqrt Math x {
		if(x % j == 0)
		    return 0;

		j += 2;
	    } if(x % j == 0)
		    return 0; x % j == 0 x % j x j 0 return 0; 0 j += 2 j 2 return 1; 1 int x x public class Main
{
    public static void main(String[] args)
    {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    }
    
    public static int isprime(int x)
    {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    }
} public class Main
{
    public static void main(String[] args)
    {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    }
    
    public static int isprime(int x)
    {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    }
} Main
import java.util.Scanner;

public class Main
{
    public static void main(String[] args)
    {
	Scanner In = new Scanner(System.in);
	
	int n,count = 0;
	
	do
	    {
		n = In.nextInt();
	    }while(1 >= n && n >= 10000);
	
	int []a = new int[n];

	for(int i = 0; i < n; i++)
	    {
		do
		    {
			a[i] = In.nextInt();
		}while(a[i] <= 2 && a[i] >= Math.pow(10,8));

		if((isprime(a[i])) == 1)
		   count++;
	    }
		System.out.println(count);
    }
    
    public static int isprime(int x)
    {
	if(x == 2)
	    return 1;

	if(x < 2 || x % 2 == 0)
	    return 0;
    
	int j = 3;
	while(j <= Math.sqrt(x))
	    {
		if(x % j == 0)
		    return 0;

		j += 2;
	    }
	return 1;
    }
}