import math


def counting_example(n):
    """
    What comes in:  The sole argument is a non-negative integer n.
    What goes out:  Returns the number of integers from 1 to n,
      inclusive, whose cosine is positive.
    Side effects:   None.
    Examples:
      -- counting_example(2) returns 1
             since the cosine(1) is about 0.54 (positive)
             and   the cosine(2) is about -0.42 (negative)

      -- counting_example(20) returns 11
             since the cosines of 1, 5, 6, 7, 11, 12, 13, 14, 18, 19
             and 20 are positive

      -- counting_example(0) returns 0
             since the cosine(0) is not positive.
    """
    count = 0  # Initialize to 0 BEFORE the loop
    for k in range(n):  # Loop
        if math.cos(k + 1) > 0:  # If the condition holds:
            count = count + 1  # Increment INSIDE the loop.

    return count