InterviewBit Problems   Count Element Occurence : Unsolved

My code is giving wrong answer in submission, but gives correct answer when run w (1)
On submission I am getting wrong answer for a test case but when I am testing it (1)
Can we change the number of arguments in the function? Because if we want to do i (3)
Or there should be some option for doing it recursively. :P (1)