Counting the number of documents in a partial index

I do not know if you can get what you want exactly but the following is the closest I could find.