import java.io.*;
  
class Main {
    public static void main(String[] args) {
        BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
        try {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } catch( IOException e ) {
            System.err.println( e );
        }
    }
} import java.io.*; io.* java class Main {
    public static void main(String[] args) {
        BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
        try {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } catch( IOException e ) {
            System.err.println( e );
        }
    }
} Main public static void main(String[] args) {
        BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
        try {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } catch( IOException e ) {
            System.err.println( e );
        }
    } main {
        BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
        try {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } catch( IOException e ) {
            System.err.println( e );
        }
    } BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) ); kb new BufferedReader( new InputStreamReader( System.in ) ) try {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } catch( IOException e ) {
            System.err.println( e );
        } catch( IOException e ) {
            System.err.println( e );
        } IOException e {
            System.err.println( e );
        } System.err.println( e ) System.err.println System.err System System.err e {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } int n = Integer.parseInt( kb.readLine() ); n Integer.parseInt( kb.readLine() ) Integer.parseInt Integer kb.readLine() kb.readLine kb int num; num int cnt = n; cnt n int i i j; j for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            } i=0; i=0 i 0 i<n i n i++ i++ i {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            } {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            } num = Integer.parseInt( kb.readLine() ) num Integer.parseInt( kb.readLine() ) Integer.parseInt Integer kb.readLine() kb.readLine kb if( 2 == num ) { continue; } 2 == num 2 num { continue; } continue; if( 0 == num%2 ) {
					cnt--;
					continue;
				} 0 == num%2 0 num%2 num 2 {
					cnt--;
					continue;
				} cnt-- cnt continue; for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                } j=3; j=3 j 3 j*j<=num j*j j j num j+=2 j+=2 j 2 {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                } {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                } if( 0 == num%j ) {
                        cnt--;
						break;
                    } 0 == num%j 0 num%j num j {
                        cnt--;
						break;
                    } cnt-- cnt break; System.out.println( cnt  ) System.out.println System.out System System.out cnt kb.close() kb.close kb String[] args args
import java.io.*;
  
class Main {
    public static void main(String[] args) {
        BufferedReader kb = new BufferedReader( new InputStreamReader( System.in ) );
        try {
            int n = Integer.parseInt( kb.readLine() );
             
            int num;
			int cnt = n;
            int i, j;
            for( i=0; i<n; i++ ) {
                num = Integer.parseInt( kb.readLine() );
				if( 2 == num ) { continue; }
				if( 0 == num%2 ) {
					cnt--;
					continue;
				}
                for( j=3; j*j<=num; j+=2 ) {
                    if( 0 == num%j ) {
                        cnt--;
						break;
                    }
                }
            }
             
            System.out.println( cnt  );
              
            kb.close();
        } catch( IOException e ) {
            System.err.println( e );
        }
    }
}