Counting the number of documents in a partial index

Ah yes, then not a solution indeed.