import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count=0;
		long temp=0;

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		System.out.println(count);

	}

	public static int sosu(long num) {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	}
}
 import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count=0;
		long temp=0;

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		System.out.println(count);

	}

	public static int sosu(long num) {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count=0;
		long temp=0;

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		System.out.println(count);

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

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		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 int count=0; count 0 long temp=0; temp 0 for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		} int i=0; int i=0; i 0 i<n i n i++ i++ i {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		} {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		} temp=sc.nextLong() temp sc.nextLong() sc.nextLong sc if(temp==2||temp%2!=0) {
				count += sosu(temp);
			} temp==2||temp%2!=0 temp==2 temp 2 temp%2!=0 temp%2 temp 2 0 {
				count += sosu(temp);
			} count += sosu(temp) count sosu(temp) sosu temp System.out.println(count) System.out.println System.out System System.out count String[] args args public static int sosu(long num) {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	} sosu {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	} int res=1; res 1 for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		} int i=2; int i=2; i 2 i<=Math.sqrt(num) i Math.sqrt(num) Math.sqrt Math num i++ i++ i {
			if(num%i==0) {
				res=0;
				break;
			}
		} {
			if(num%i==0) {
				res=0;
				break;
			}
		} if(num%i==0) {
				res=0;
				break;
			} num%i==0 num%i num i 0 {
				res=0;
				break;
			} res=0 res 0 break; return res; res long num num public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count=0;
		long temp=0;

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		System.out.println(count);

	}

	public static int sosu(long num) {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count=0;
		long temp=0;

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		System.out.println(count);

	}

	public static int sosu(long num) {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int count=0;
		long temp=0;

		for(int i=0;i<n;i++) {
			temp=sc.nextLong();
			if(temp==2||temp%2!=0) {
				count += sosu(temp);
			}
		}
		System.out.println(count);

	}

	public static int sosu(long num) {
		int res=1;
		for(int i=2;i<=Math.sqrt(num);i++) {
			if(num%i==0) {
				res=0;
				break;
			}
		}
		return res;
	}
}

