import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

/**
 * Greatest Common Divisor
 *
 */
public class Main {
    
    public static void main(String[] args) {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    }

    private static boolean isPrimeNumber(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
    
    private static List<String> mocups() {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    }

    /** output data */
    private static void output(Object o) {
        System.out.println(o);
    }
    private static void output(String[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(int[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(Object[] o) {
        System.out.println(Arrays.toString(o));
    }

    /** input data */
    private static List<String> inputLines() {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    }

} import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util public class Main {
    
    public static void main(String[] args) {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    }

    private static boolean isPrimeNumber(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
    
    private static List<String> mocups() {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    }

    /** output data */
    private static void output(Object o) {
        System.out.println(o);
    }
    private static void output(String[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(int[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(Object[] o) {
        System.out.println(Arrays.toString(o));
    }

    /** input data */
    private static List<String> inputLines() {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    }

} Main public static void main(String[] args) {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    } main {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    } List<String> input = inputLines(); input inputLines() inputLines int counter = 0; counter 0 for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        } String target input {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        } {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        } counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0 counter isPrimeNumber(Integer.valueOf(target)) ? 1 : 0 isPrimeNumber(Integer.valueOf(target)) isPrimeNumber Integer.valueOf(target) Integer.valueOf Integer target 1 0 output(counter) output counter String[] args args private static boolean isPrimeNumber(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    } isPrimeNumber {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    } if (n < 2) {
            return false;
        } n < 2 n 2 {
            return false;
        } return false; false if (n == 2) {
            return true;
        } n == 2 n 2 {
            return true;
        } return true; true if (n % 2 == 0) {
            return false;
        } n % 2 == 0 n % 2 n 2 0 {
            return false;
        } return false; false for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        } int i = 3; int i = 3; i 3 i <= n / i i n / i n i i += 2 i += 2 i 2 {
            if (n % i == 0) {
                return false;
            }
        } {
            if (n % i == 0) {
                return false;
            }
        } if (n % i == 0) {
                return false;
            } n % i == 0 n % i n i 0 {
                return false;
            } return false; false return true; true int n n private static List<String> mocups() {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    } mocups {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    } List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                ); input Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                ) Arrays.asList Arrays "6" "1" "3" "6" "4" "5" "17" "3" return input; input /** output data */
    private static void output(Object o) {
        System.out.println(o);
    } output {
        System.out.println(o);
    } System.out.println(o) System.out.println System.out System System.out o Object o o private static void output(String[] o) {
        System.out.println(Arrays.toString(o));
    } output {
        System.out.println(Arrays.toString(o));
    } System.out.println(Arrays.toString(o)) System.out.println System.out System System.out Arrays.toString(o) Arrays.toString Arrays o String[] o o private static void output(int[] o) {
        System.out.println(Arrays.toString(o));
    } output {
        System.out.println(Arrays.toString(o));
    } System.out.println(Arrays.toString(o)) System.out.println System.out System System.out Arrays.toString(o) Arrays.toString Arrays o int[] o o private static void output(Object[] o) {
        System.out.println(Arrays.toString(o));
    } output {
        System.out.println(Arrays.toString(o));
    } System.out.println(Arrays.toString(o)) System.out.println System.out System System.out Arrays.toString(o) Arrays.toString Arrays o Object[] o o /** input data */
    private static List<String> inputLines() {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    } inputLines {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) List<String> input = new ArrayList<String>(); input new ArrayList<String>() while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        } in.hasNext() in.hasNext in {
            String buf = in.nextLine();
            input.add(buf);
        } String buf = in.nextLine(); buf in.nextLine() in.nextLine in input.add(buf) input.add input buf in.close() in.close in return input; input public class Main {
    
    public static void main(String[] args) {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    }

    private static boolean isPrimeNumber(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
    
    private static List<String> mocups() {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    }

    /** output data */
    private static void output(Object o) {
        System.out.println(o);
    }
    private static void output(String[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(int[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(Object[] o) {
        System.out.println(Arrays.toString(o));
    }

    /** input data */
    private static List<String> inputLines() {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    }

} public class Main {
    
    public static void main(String[] args) {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    }

    private static boolean isPrimeNumber(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
    
    private static List<String> mocups() {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    }

    /** output data */
    private static void output(Object o) {
        System.out.println(o);
    }
    private static void output(String[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(int[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(Object[] o) {
        System.out.println(Arrays.toString(o));
    }

    /** input data */
    private static List<String> inputLines() {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    }

} Main
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

/**
 * Greatest Common Divisor
 *
 */
public class Main {
    
    public static void main(String[] args) {
        // input data
        List<String> input = inputLines();
        
        // get data
        int counter = 0;
        
        // main logic
        for (String target : input) {
            counter += isPrimeNumber(Integer.valueOf(target)) ? 1 : 0;
        }
        output(counter);
    }

    private static boolean isPrimeNumber(int n) {
        if (n < 2) {
            return false;
        }
        if (n == 2) {
            return true;
        }
        
        // ??¶??°
        if (n % 2 == 0) {
            return false;
        }
        
        // ?\???°
        for (int i = 3; i <= n / i; i += 2) {
            if (n % i == 0) {
                return false;
            }
        }
        return true;
    }
    
    private static List<String> mocups() {
        List<String> input = Arrays.asList(
                "6",
                "1",
                "3",
                "6",
                "4",
                "5",
                "17",
                "3"
                );
        return input;
    }

    /** output data */
    private static void output(Object o) {
        System.out.println(o);
    }
    private static void output(String[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(int[] o) {
        System.out.println(Arrays.toString(o));
    }
    private static void output(Object[] o) {
        System.out.println(Arrays.toString(o));
    }

    /** input data */
    private static List<String> inputLines() {
        Scanner in = new Scanner(System.in);
        List<String> input = new ArrayList<String>();
        while(in.hasNext()) {
            String buf = in.nextLine();
            input.add(buf);
        }
        in.close();
        return input;
    }

}