Compose a code in Python that counts the number of positive integers in a list.
numbers = [1, -2, 3, -4, 5]
def count_positive_numbers(numbers):
    count = 0
    for num in numbers:
        if num > 0:
            count += 1
    return count