input: Write a function to count the occurrences of a character in a string.
  assert count_char('hello world', 'l') == 3
  assert count_char('test case', 't') == 2
  assert count_char('mississippi', 's') == 4
output: def count_char(string, char):
      return string.count(char)