Ok so the limits are high enough for a counter's typical use case :)
The implementation I've in mind is generalized but maybe linked to a model.
Imagine a class defined as follows:
class ShardedCounter(db.Model):
mod = db.StringProperty(required=True, default='')
name = db.StringProperty(required=True)
count = db.IntegerProperty(required=True, default=0)
Use cases are:
1) When you need to add a count property to a model
c = get_sharded_counter(model=Post, name="comments")
this will get the sharded counter named "comments" which is linked to Post.key
2) When you need to keep a global counter
c = get_sharded_counter(name="site_logins")
this will get the sharded counter name 'site_logins' which "mod" property is ''.
ok, the above class could be enhanced to use only the name property, defining it by the concatenation of mod.key and name.
this is only a possible implementation in my mind :D
What do you think?