Modified installer to count number of documents in each category