Translate the following pseudocode into Python
"For each element in the array, if it is an even number, add one to a counter"
def count_even(arr): 
    count = 0
    for x in arr: 
        if x % 2 == 0: 
            count += 1
    return count