Write a Python program to check how many times a given element occurs in a list.
List: [1, 2, 3, 2, 4, 2, 1]
Element: 2
def count_element_occurrence(lst, target):
 count = 0
 for element in lst:
     if element == target:
         count += 1
 return count