import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int b, count = 0;
		for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		}
		
		System.out.println(count);
	}

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

	private static boolean isPrime(int num)
	{
		if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
    	return true;
	}
} Main public static void main(String args[])
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int b, count = 0;
		for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		}
		
		System.out.println(count);
	} main {
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int b, count = 0;
		for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		}
		
		System.out.println(count);
	} Scanner input = new Scanner(System.in); input new Scanner(System.in) int n = input.nextInt(); n input.nextInt() input.nextInt input int b b count = 0; count 0 for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		} int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
			if( isPrime( input.nextInt() ) )
				count++;
		} {
			if( isPrime( input.nextInt() ) )
				count++;
		} if( isPrime( input.nextInt() ) )
				count++; isPrime( input.nextInt() ) isPrime input.nextInt() input.nextInt input count++ count System.out.println(count) System.out.println System.out System System.out count String args[] args private static boolean isPrime(int num)
	{
		if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
    	return true;
	} isPrime {
		if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
    	return true;
	} if (num == 2 ) return true; num == 2 num 2 return true; true if (num % 2 == 0) return false; num % 2 == 0 num % 2 num 2 0 return false; false for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false; int i = 3; int i = 3; i 3 i * i <= num i * i i i num i += 2 i += 2 i 2 if (num % i == 0) return false; if (num % i == 0) return false; num % i == 0 num % i num i 0 return false; false return true; true int num num public class Main
{
	public static void main(String args[])
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int b, count = 0;
		for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		}
		
		System.out.println(count);
	}

	private static boolean isPrime(int num)
	{
		if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
    	return true;
	}
} public class Main
{
	public static void main(String args[])
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int b, count = 0;
		for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		}
		
		System.out.println(count);
	}

	private static boolean isPrime(int num)
	{
		if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
    	return true;
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String args[])
	{
		Scanner input = new Scanner(System.in);
		int n = input.nextInt();
		int b, count = 0;
		for(int i = 0; i < n; i++)
		{
			if( isPrime( input.nextInt() ) )
				count++;
		}
		
		System.out.println(count);
	}

	private static boolean isPrime(int num)
	{
		if (num == 2 ) return true;
        if (num % 2 == 0) return false;
        for (int i = 3; i * i <= num; i += 2)
            if (num % i == 0) return false;
    	return true;
	}
}