import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = 0;
		int count = 0;
		while (sc.hasNext()) {
			x = sc.nextInt();
			if (isPrime(x))
				count++;
		}
		System.out.println(count);
	}

	public static boolean isPrime(int x) {
		if (x == 2) {
			return true;
		} else if (2 > x || x % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(x)) {
			if (x % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = 0;
		int count = 0;
		while (sc.hasNext()) {
			x = sc.nextInt();
			if (isPrime(x))
				count++;
		}
		System.out.println(count);
	}

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

	public static boolean isPrime(int x) {
		if (x == 2) {
			return true;
		} else if (2 > x || x % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(x)) {
			if (x % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = 0;
		int count = 0;
		while (sc.hasNext()) {
			x = sc.nextInt();
			if (isPrime(x))
				count++;
		}
		System.out.println(count);
	}

	public static boolean isPrime(int x) {
		if (x == 2) {
			return true;
		} else if (2 > x || x % 2 == 0) {
			return false;
		}
		int i = 3;
		while (i <= Math.sqrt(x)) {
			if (x % i == 0) {
				return false;
			}
			i = i + 2;
		}
		return true;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int x = 0;
		int count = 0;
		while (sc.hasNext()) {
			x = sc.nextInt();
			if (isPrime(x))
				count++;
		}
		System.out.println(count);
	}

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

