input: Write a python function to count the occurrences of a specific character in a string.
  assert count_char('This is a sample string.', 's') == 3
  assert count_char('hello world', 'l') == 3
  assert count_char('aabbccdd', 'b') == 2
output: def count_char(s, char):
      return s.count(char)