class_docstr: Profiling Counter class.
  
  The counter event can track a value as it changes over time.
  
  Parameters
  ----------
  domain : Domain object
      Domain to which this object belongs
  name : string
      Name of the counter
  value: integer, optional
      Initial value of the counter
code: def __init__(self, domain, name, value=None):
      self.name = name
      self.handle = ProfileHandle()
      check_call(
          _LIB.MXProfileCreateCounter(
              domain.handle, c_str(name), ctypes.byref(self.handle)
          )
      )
      if value is not None:
          self.set_value(value)
  
imports: import ctypes
  import contextlib
  import contextvars
  import warnings
  from .base import _LIB, check_call, c_str, ProfileHandle, c_str_array, py_str, KVStoreHandle
label_desc: Use image node_id 1 to create a new Counter object from inherited base classes: object with example: obj = Counter(domain, name, value)