code: def count(self):
          
          count = 0
          operation = self._get_operation()
          kwargs = self.kwargs.copy()
          kwargs['select'] = 'COUNT'
          limit = kwargs.get('limit', None)
          while True:
              result = operation(self.model.get_table_name(), **kwargs)
              count += result['Count']
              if limit is not None:
                  limit -= result['Count']
  
              last_evaluated_key = result.get('LastEvaluatedKey', None)
              if not self._prepare_next_fetch(kwargs, last_evaluated_key, limit):
                  break
          return count
docs: Total count of the matching items.
  
          It sums up the count of partial results, and returns the total count of
          matching items in the table.