def count(s, c):
    total = 0
    for ch in s:
        if ch == c:
            total += 1
    return total