```python
def count_Primes_nums(n):
    """
    Counts the number of prime numbers less than a given non-negative number n.
    Uses the Sieve of Eratosthenes algorithm for efficiency.
    """
    if n < 3:
        return 0
    
    # Create a boolean list "is_prime" of size n, initialized to True.
    # A value in is_prime[i] will be False if i is not a prime, else True.
    is_prime = [True] * n
    is_prime[0] = is_prime[1] = False  # 0 and 1 are not prime numbers

    # Iterate from 2 up to the square root of n.
    # Any composite number m has a prime factor less than or equal to sqrt(m).
    for i in range(2, int(n**0.5) + 1):
        # If is_prime[i] is still True, then i is a prime.
        if is_prime[i]:
            # Mark all multiples of i as not prime.
            # We can start marking from i*i because smaller multiples
            # (e.g., 2*i, 3*i) would have already been marked by smaller primes (2, 3).
            # Using slice assignment is an efficient way to do this in Python.
            is_prime[i*i: n: i] = [False] * len(is_prime[i*i: n: i])

    # Count the number of True values in the list.
    # sum() on a list of booleans treats True as 1 and False as 0.
    return sum(is_prime)
```