category counting now unified with word counting