(n)
Return the value of the prime counting function pi(n) = the number
        of prime numbers less than or equal to n.

        Examples
        ========

        >>> from sympy import primepi
        >>> primepi(25)
        9

        See Also
        ========

        sympy.ntheory.primetest.isprime : Test if n is prime
        primerange : Generate all primes in a given range
        prime : Return the nth prime
Return the value of the prime counting function pi(n) = the number
        of prime numbers less than or equal to n.
Return the value of the prime counting function pi ( n ) = the number of prime numbers less than or equal to n .
def primepi(n):
    """ Return the value of the prime counting function pi(n) = the number
        of prime numbers less than or equal to n.

        Examples
        ========

        >>> from sympy import primepi
        >>> primepi(25)
        9

        See Also
        ========

        sympy.ntheory.primetest.isprime : Test if n is prime
        primerange : Generate all primes in a given range
        prime : Return the nth prime
    """
    n = int(n)
    if n < 2:
        return 0
    else:
        return sieve.search(n)[0]
def primepi ( n ) : n = int ( n ) if n < 2 : return 0 else : return sieve . search ( n ) [ 0 ]