title: How do I get a count of all entries of a given type stored in Google appengine's datastore?
body: <p>What I'm looking for essentially is this SQL translated into Google AppEngine (for Java) terms:</p>
  
  <pre><code>select count(*) from Customers
  </code></pre>
  
  <p>Seems simple enough, but from reading the documentation, it seems like I would have to run a query that matches all Customers, loop though it and count the results, taking paging into account. I do not want to retrieve each and every element, I just want to count them.</p>
  
  <p>Or another way, there was an API to loop over all entries of a given type (can't find the exact API at the moment). This seems to be quite inefficient, not to mention that datastore calls come with a limited quota as well.</p>
  
  <p>Any hints would be appreciated.</p>
  
  <p>Thanks, Mark</p>