class_docstr: Class for determining where to split rmd options
docstr: Update parenthesis counters
docstr_tok: ["Update","parenthesis","counters"]
code: def count_special_chars(self, char, prev_char):
      """Update parenthesis counters"""
      if char == "(":
          self.parenthesis_count += 1
      elif char == ")":
          self.parenthesis_count -= 1
          if self.parenthesis_count < 0:
              raise RMarkdownOptionParsingError(
                  'Option line "{}" has too many '
                  "closing parentheses".format(self.line)
              )
      elif char == "{":
          self.curly_bracket_count += 1
      elif char == "}":
          self.curly_bracket_count -= 1
          if self.curly_bracket_count < 0:
              raise RMarkdownOptionParsingError(
                  'Option line "{}" has too many '
                  "closing curly brackets".format(self.line)
              )
      elif char == "[":
          self.square_bracket_count += 1
      elif char == "]":
          self.square_bracket_count -= 1
          if self.square_bracket_count < 0:
              raise RMarkdownOptionParsingError(
                  'Option line "{}" has too many '
                  "closing square brackets".format(self.line)
              )
      elif (
          char == "'" and prev_char != "\\" and not self.in_double_quote
      ):
          self.in_single_quote = not self.in_single_quote
      elif (
          char == '"' and prev_char != "\\" and not self.in_single_quote
      ):
          self.in_double_quote = not self.in_double_quote
  
imports: import ast
  import re
  from json import dumps, loads
  from .languages import _JUPYTER_LANGUAGES
label_desc: Use image node_id 3 for calling the ParsingContext obj's underlying member method code with example usage: obj.count_special_chars(char, prev_char) without return types