import java.io.*;
import java.util.*;

class JudgingMchine {
    static boolean isPrime(int x) {
        if(x == 2) {
        return true;
    }
    if(x < 2 || x % 2 == 0) {
        return false;
    }

    int i =3;
    while(i <= Math.sqrt(x)) {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    }
    return true;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    }
} import java.io.*; io.* java import java.util.*; util.* java class JudgingMchine {
    static boolean isPrime(int x) {
        if(x == 2) {
        return true;
    }
    if(x < 2 || x % 2 == 0) {
        return false;
    }

    int i =3;
    while(i <= Math.sqrt(x)) {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    }
    return true;
    }
} JudgingMchine static boolean isPrime(int x) {
        if(x == 2) {
        return true;
    }
    if(x < 2 || x % 2 == 0) {
        return false;
    }

    int i =3;
    while(i <= Math.sqrt(x)) {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    }
    return true;
    } isPrime {
        if(x == 2) {
        return true;
    }
    if(x < 2 || x % 2 == 0) {
        return false;
    }

    int i =3;
    while(i <= Math.sqrt(x)) {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    }
    return true;
    } if(x == 2) {
        return true;
    } x == 2 x 2 {
        return true;
    } 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;
    } return false; false int i =3; i 3 while(i <= Math.sqrt(x)) {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    } i <= Math.sqrt(x) i Math.sqrt(x) Math.sqrt Math x {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    } if(x % i == 0) {
            return false;
        } x % i == 0 x % i x i 0 {
            return false;
        } return false; false i += 2 i 2 return true; true int x x public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    } main {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc List<Integer> nums = new ArrayList<>(); nums new ArrayList<>() for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    } int i=0; int i=0; i 0 i<n i n ++i ++i i {
        nums.add(sc.nextInt());
    } {
        nums.add(sc.nextInt());
    } nums.add(sc.nextInt()) nums.add nums sc.nextInt() sc.nextInt sc int count = 0; count 0 for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    } int num nums {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    } {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    } if(JudgingMchine.isPrime(num)) {
            count++;
        } JudgingMchine.isPrime(num) JudgingMchine.isPrime JudgingMchine num {
            count++;
        } count++ count System.out.println(count) System.out.println System.out System System.out count String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    }
} Main
import java.io.*;
import java.util.*;

class JudgingMchine {
    static boolean isPrime(int x) {
        if(x == 2) {
        return true;
    }
    if(x < 2 || x % 2 == 0) {
        return false;
    }

    int i =3;
    while(i <= Math.sqrt(x)) {
        if(x % i == 0) {
            return false;
        }
        i += 2;
    }
    return true;
    }
}

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();

    List<Integer> nums = new ArrayList<>();
    for(int i=0; i<n; ++i) {
        nums.add(sc.nextInt());
    }

    int count = 0;
    for(int num : nums) {
        if(JudgingMchine.isPrime(num)) {
            count++;
        }
    }

    System.out.println(count);

    }
}