New counting and querying approach.