title: Invalid operator '$size' in aggregation
body: <p>I got the following piece of code: </p>
  
  <pre><code>from pymongo import MongoClient
  client = MongoClient('ipOfServer')
  db = client.admin
  db.authenticate('login', 'password',
  source='admin_')
  heh = list(db.events.aggregate(
      [
          {"$match": {"status": 'start'}},
          {"$group": {"_id": "$eventName", "players": {"$addToSet": "$uid"}}},
          {"$project": {"_id": 1, "Count": {"$size": "$players"}}}
      ]))
  print(heh)
  </code></pre>
  
  <p>and this is worked for the original programmer who wrote and tested it <a href="http://i.stack.imgur.com/zRiah.png" rel="nofollow">code result while testing</a>. But when I try to run it I'm getting this error:</p>
  
  <pre><code>pymongo.errors.OperationFailure: exception: invalid operator '$size'
  </code></pre>
  
  <p>I'm using mongo version 2.4.14 and python 2.7.12 with the sublime text editor. Could anyone suggest ways to solve this problem, it would be appreciated.</p>