add helper method to get counts of indexed documents by class