import java.math.BigInteger;
import java.util.*;

public class Main {
    static int primeCounter = 0;

    public static void main(String args[]) {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    }
} import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java public class Main {
    static int primeCounter = 0;

    public static void main(String args[]) {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    }
} Main static int primeCounter = 0; primeCounter 0 public static void main(String args[]) {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    } main {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    } int numEl; numEl Scanner inp = new Scanner(System.in); inp new Scanner(System.in) numEl = inp.nextInt() numEl inp.nextInt() inp.nextInt inp for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        } int i = 0; int i = 0; i 0 i < numEl i numEl i++ i++ i {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        } {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        } BigInteger input = new BigInteger(inp.next()); input new BigInteger(inp.next()) if (input.isProbablePrime(5)) {
                primeCounter++;
            } input.isProbablePrime(5) input.isProbablePrime input 5 {
                primeCounter++;
            } primeCounter++ primeCounter System.out.println(primeCounter) System.out.println System.out System System.out primeCounter String args[] args public class Main {
    static int primeCounter = 0;

    public static void main(String args[]) {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    }
} public class Main {
    static int primeCounter = 0;

    public static void main(String args[]) {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    }
} Main
import java.math.BigInteger;
import java.util.*;

public class Main {
    static int primeCounter = 0;

    public static void main(String args[]) {
        // input

        int numEl;

        Scanner inp = new Scanner(System.in);

        numEl = inp.nextInt();

        for (int i = 0; i < numEl; i++) {
            BigInteger input = new BigInteger(inp.next());

            if (input.isProbablePrime(5)) {
                primeCounter++;
            }
        }

        System.out.println(primeCounter);
    }
}
