Assuming, you are using Solr 4.0+, I believe facet pivoting is a better way to do this.
Try:
http://localhost:8983/solr/select?q=*:*&facet.pivot=category,sub_category&facet=true&facet.field=category&rows=0
Update: Hmm, but that's not going to give you the unique counts though :-? That will give you something like this, if that's OK with you:
+ Apparel [5]
|--- Pants [3]
|--- Shirts [2]
|
+ Sports [2]
|--- Balls [2]