input: 
  def countEvenNum(list):
      return len([x for x in list if x % 2 == 0])
  
  # Testing the function
  list = [1, 2, 3, 4, 5]
  print(countEvenNum(list))  # Output: 2
  
output:     count = 0
      for num in list:
          if num % 2 == 0:
              count += 1
      return count