* The datastore iterates through the index and counts for you.
* You will not be able to count 4 billion records in the time allowed
to service a request.
If you need realtime counts of large numbers of records, you need to
consider alternative strategies. There is much discussion of this in
the archives of the google appengine mailing list.
Jeff
Jeff