The function f(x) counts the total number of occurrences of the characters 'b' and 'c' in the input string.

[CODE]: 
```python
def count_b_and_c(string):
    count = 0
    for char in string:
        if char == 'b' or char == 'c':
            count += 1
    return count
```