import java.util.Scanner;
class Main
{
	static boolean isPrime( int x )
	{
		if( x == 2 )return true;
		if( x<2 || x%2==0 )return false;
		for( int i = 3 ; i*i <= x ; i++ )
			if( x%i==0 )return false;
		return true;
	}
	public static void main( String[] args )
	{
		Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt(), counter=0;
		for( ; n != 0 ; n-- )
			if( isPrime(sc.nextInt()) )counter++;
		
		System.out.println( counter );
	}
} import java.util.Scanner; Scanner java.util class Main
{
	static boolean isPrime( int x )
	{
		if( x == 2 )return true;
		if( x<2 || x%2==0 )return false;
		for( int i = 3 ; i*i <= x ; i++ )
			if( x%i==0 )return false;
		return true;
	}
	public static void main( String[] args )
	{
		Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt(), counter=0;
		for( ; n != 0 ; n-- )
			if( isPrime(sc.nextInt()) )counter++;
		
		System.out.println( counter );
	}
} Main static boolean isPrime( int x )
	{
		if( x == 2 )return true;
		if( x<2 || x%2==0 )return false;
		for( int i = 3 ; i*i <= x ; i++ )
			if( x%i==0 )return false;
		return true;
	} isPrime {
		if( x == 2 )return true;
		if( x<2 || x%2==0 )return false;
		for( int i = 3 ; i*i <= x ; i++ )
			if( x%i==0 )return false;
		return true;
	} if( x == 2 )return true; x == 2 x 2 return true; true if( x<2 || x%2==0 )return false; x<2 || x%2==0 x<2 x 2 x%2==0 x%2 x 2 0 return false; false for( int i = 3 ; i*i <= x ; i++ )
			if( x%i==0 )return false; int i = 3 ; int i = 3 ; i 3 i*i <= x i*i i i x i++ i++ i if( x%i==0 )return false; if( x%i==0 )return false; x%i==0 x%i x i 0 return false; false return true; true int x x public static void main( String[] args )
	{
		Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt(), counter=0;
		for( ; n != 0 ; n-- )
			if( isPrime(sc.nextInt()) )counter++;
		
		System.out.println( counter );
	} main {
		Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt(), counter=0;
		for( ; n != 0 ; n-- )
			if( isPrime(sc.nextInt()) )counter++;
		
		System.out.println( counter );
	} Scanner sc = new java.util.Scanner( System.in ); sc new java.util.Scanner( System.in ) int n = sc.nextInt() n sc.nextInt() sc.nextInt sc counter=0; counter 0 for( ; n != 0 ; n-- )
			if( isPrime(sc.nextInt()) )counter++; ; n != 0 n 0 n-- n-- n if( isPrime(sc.nextInt()) )counter++; if( isPrime(sc.nextInt()) )counter++; isPrime(sc.nextInt()) isPrime sc.nextInt() sc.nextInt sc counter++ counter System.out.println( counter ) System.out.println System.out System System.out counter String[] args args
import java.util.Scanner;
class Main
{
	static boolean isPrime( int x )
	{
		if( x == 2 )return true;
		if( x<2 || x%2==0 )return false;
		for( int i = 3 ; i*i <= x ; i++ )
			if( x%i==0 )return false;
		return true;
	}
	public static void main( String[] args )
	{
		Scanner sc = new java.util.Scanner( System.in );
		
		int n = sc.nextInt(), counter=0;
		for( ; n != 0 ; n-- )
			if( isPrime(sc.nextInt()) )counter++;
		
		System.out.println( counter );
	}
}