> Now i don't know if this is the best way of doing it but it does not
> require you to do some writing on datastore and it uses memcache, if
> there is a better way of doing this please stress out. Thanks. :)
That's a terrible way of doing this: (a) possibly inaccurate, and (b)
unscalable. The correct way to implement such a global counter is via
something like a sharded counter that you increment each time you add
an entity and decrement each time you remove an entity.
Dave.