def increment_counter(self, id, counter_name, increment=<NUM_LIT:1>,<EOL>id_name='<STR_LIT:id>', **kwargs):
response = self._new_response()<EOL>if self._check_supported_op('<STR_LIT>', response):<EOL><INDENT>params = {<EOL>'<STR_LIT>': {id_name: id},<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': {"<STR_LIT>": counter_name},<EOL>'<STR_LIT>': {<EOL>'<STR_LIT>': decimal.Decimal(increment)},<EOL>'<STR_LIT>': '<STR_LIT>'<EOL>}<EOL>self._call_ddb_method(self.table.update_item, params, response)<EOL>if response.status == '<STR_LIT:success>':<EOL><INDENT>if '<STR_LIT>' in response.raw_response:<EOL><INDENT>self._replace_decimals(response.raw_response)<EOL>attr = response.raw_response['<STR_LIT>'][counter_name]<EOL>response.data = attr<EOL><DEDENT><DEDENT><DEDENT>response.prepare()<EOL>return response<EOL>
Atomically increments a counter attribute in the item identified by
``id``.  You must specify the name of the attribute as ``counter_name``
and, optionally, the ``increment`` which defaults to ``1``.