Question: 
Write a python function to count the occurrence of a given character in a string.


Model's Code:
def count(s, char):
    return s.count(char)



Sample Correct Code:
def count(s,c) : 
    res = 0 
    for i in range(len(s)) : 
        if (s[i] == c): 
            res = res + 1
    return res 


Asserts:
assert count("abcc","c") == 2
assert count("ababca","a") == 3
assert count("mnmm0pm","m") == 4


Tests:
Test 1 of 3: PASS
Test 2 of 3: PASS
Test 3 of 3: PASS

Test 204 of 974: 151/204 (74.01960784313727%): success