import java.util.Scanner;

public class Main {

    public static void main(String[] args)
    {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    }

    public static boolean Check(int a)
    {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args)
    {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    }

    public static boolean Check(int a)
    {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    }
} Main public static void main(String[] args)
    {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    } main {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int Count=0; Count 0 int count_num=scan.nextInt(); count_num scan.nextInt() scan.nextInt scan for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        } int j=0; int j=0; j 0 j<count_num j count_num j++ j++ j {
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        } {
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        } if(Check(scan.nextInt()))
            {
                Count++;
            } Check(scan.nextInt()) Check scan.nextInt() scan.nextInt scan {
                Count++;
            } Count++ Count System.out.println(Count) System.out.println System.out System System.out Count String[] args args public static boolean Check(int a)
    {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    } Check {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    } if(a==2 || a==3) return true; a==2 || a==3 a==2 a 2 a==3 a 3 return true; true if(a<=3  || a%2==0) return false; a<=3  || a%2==0 a<=3 a 3 a%2==0 a%2 a 2 0 return false; false for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        } int i=3; int i=3; i 3 i<=Math.sqrt((double)a) i Math.sqrt((double)a) Math.sqrt Math (double)a i+=2 i+=2 i 2 {
            if(a%i==0) return false;
        } {
            if(a%i==0) return false;
        } if(a%i==0) return false; a%i==0 a%i a i 0 return false; false return true; true int a a public class Main {

    public static void main(String[] args)
    {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    }

    public static boolean Check(int a)
    {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    }
} public class Main {

    public static void main(String[] args)
    {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    }

    public static boolean Check(int a)
    {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args)
    {
        Scanner scan=new Scanner(System.in);
        int Count=0;
        int count_num=scan.nextInt();

        for(int j=0;j<count_num;j++){
            if(Check(scan.nextInt()))
            {
                Count++;
            }
        }

        System.out.println(Count);
    }

    public static boolean Check(int a)
    {
        if(a==2 || a==3) return true;
        if(a<=3  || a%2==0) return false;
        for(int i=3;i<=Math.sqrt((double)a);i+=2)
        {
            if(a%i==0) return false;
        }
        return true;
    }
}