count files in categories