title: MongoDB add increment to id
body: <p>I have collections in MongoDB. I need to get values from collection. If values - none -> take values from other collection and set (id +=1) and save.
  My code: </p>
  
  <pre><code>def get_next_sequence(self):
      client = MongoClient(self.__connection_string)
      db = client[self.__db_name]
      collection = db['counters']
      get_id = collection.find_one({'_id': 'breaks_column_id'})
      if get_id is None:
          db['counters'].insert_one({'_id': 'breaks_column_id', 'seq': 1})
          return 1
      else:
          get_id += 1
          db['counters'].update_one({'_id': 'breaks_column_id', 'seq': get_id})
          return get_id
  </code></pre>
  
  <p>when i debug this code -> error</p>
  
  <pre><code>TypeError: unsupported operand type(s) for +=: 'dict' and 'int'
  </code></pre>