docs: def update_counter(self, bucket, key, value, w=None, dw=None, pw=None,
                         returnvalue=False):
          """
          update_counter(bucket, key, value, w=None, dw=None, pw=None,\
                         returnvalue=False)
  
          .. deprecated:: 2.1.0 (Riak 2.0) Riak 1.4-style counters are
             deprecated in favor of the :class:`~riak.datatypes.Counter`
             datatype.
  
          Updates a counter by the given value. This operation is not
          idempotent and so should not be retried automatically.
  
          :param bucket: the bucket of the counter
          :type bucket: RiakBucket
          :param key: the key of the counter
          :type key: string
          :param value: the amount to increment or decrement
          :type value: integer
          :param w: the write quorum
          :type w: integer, string, None
          :param dw: the durable write quorum
          :type dw: integer, string, None
          :param pw: the primary write quorum
          :type pw: integer, string, None
          :param returnvalue: whether to return the updated value of the counter
          :type returnvalue: bool
          """
          if not isinstance(value, six.integer_types):
              raise TypeError("Counter update amount must be an integer")
          if value == 0:
              raise ValueError("Cannot increment counter by 0")
  
          with self._transport() as transport:
              return transport.update_counter(bucket, key, value,
                                              w=w, dw=dw, pw=pw,
                                              returnvalue=returnvalue)