code: def count(env, exec_policy, first, last, value):
      """Counts the number of elements in [first, last) that equals to ``value``."""
      _assert_exec_policy_type(exec_policy)
      if not isinstance(first.ctype, _cuda_types.PointerBase):
          raise TypeError("`first` must be of pointer type")
      if first.ctype != last.ctype:
          raise TypeError("`first` and `last` must be of the same type")
      # TODO(asi1024): Typecheck for EqualityComparable.
      args = [exec_policy, first, last, value]
      params = ", ".join([a.code for a in args])
      return _Data(f"thrust::count({params})", _cuda_types.int32)
  
imports: from cupyx.jit import _internal_types
  from cupyx.jit import _cuda_types
  from cupyx.jit._internal_types import Data
label_desc: Use image node_id 10 for calling a global function with example usage: count(env, exec_policy, first, last, value) and returns: _Data