Write a function my_count1st, that takes a list of integers, Ist, and an integer, val, and returns the number of times that val occurs in Ist. If val does not appear in Ist, the function should return 0. Don't make a call to the list recreate that functionality.
The function signature is given below:
def my_count(lst, val):
# sig: list(int), int -> int
For example, a call to my_count([7,2,1,3,7,9], 7) would return 2 and a call to my_count([4,6,1,2], 3) would return 0.