implemented Store.count and Index.count