title: MongoDB - Upsert with increment
body: <p>I am trying to run the following query:</p>
  
  <pre><code>data = {
      'user_id':1,
      'text':'Lorem ipsum',
      '$inc':{'count':1}, 
      '$set':{'updated':datetime.now()},
  }
  self.db.collection('collection').update({'user_id':1}, data, upsert=True)
  </code></pre>
  
  <p>but the two '$' queries cause it to fail. Is it possible to do this within one statement? </p>