In [1]:
def voteCount(candidate,ballots):
    x = 0
    for ballot in ballots:
        if ballot == candidate:
            x += 1
    return x
In [3]:
voteCount('Raj',['Raj','Raj','Alex'])
Out[3]:
2
In [ ]: