title: Doing a global count of an object type (like Users), best practice?
body: <p>I know keeping global counters is frowned upon in app engine. I am interested in getting some stats though, like once every 24 hours. For example, I'd like to count the number of User objects in the system once every 24 hours.</p>
  
  <p>So how do we do this? Do we simply keep a set of admin tool functions which do something like:</p>
  
  <pre><code>SELECT FROM com.me.project.server.User;
  </code></pre>
  
  <p>and just see what the size of the returned List is? This is kind of a bummer because the datastore would have to deserialize every single User instance to create the returned list, right?</p>
  
  <p>I could optimize this possibly by asking for only the keys to be returned, so the whole User object doesn't have to be deserialized.</p>
  
  <p>Then again, a global counter for # of users probably would create too much contention, because there probably won't be hundreds of signups a minute for the service I'm creating.</p>
  
  <p>How should we go about doing this? Getting my total number of users once a day is probably a pretty typical operation?</p>
  
  <p>Thank you</p>