count with native datastore api