Function to store the count of prime numbers
function num_prime ( ) { prime_number [ 0 ] = 0 ; for ( i = 1 ; i <= maxm ; i ++ ) { var tmp ; if ( prime [ i ] == true ) { tmp = 1 ; } else { tmp = 0 ; } prime_number [ i ] = prime_number [ i - 1 ] + tmp ; } }