What this does is list categories within a taxonomy called profile_categories, and then lists 4 items that are within each category. The category argument is using parent => 0 so that only top-level categories are shown. What I'd like to do is also use pad_counts => 1 to grab the count of not only the category, but all subcategories within that. So - if I'm thinking of this correctly, parents conflicts with pad_counts. I've looked through the codex about this and am stuck in the mud on if this is even possible - or if I'm that clueless and am missing something obvious. Any help would be greatly appreciated. Thanks!

Update: Using http://codex.wordpress.org/Function_Reference/get_categories as a reference, when parent is set to 0 (to only show top-level categories), the $category->count and $category->category_count does not include the count of the sub-categories - still thinking this is a bug unless someone knows of a workaround.

The array of terms (which when parent=0, are are just the top level terms) gets passed to _pad_term_counts which says:

Add count of children to parent count.

Recalculates term counts by including items from child terms. Assumes all
relevant children are already in the $terms argument

So the _pad_term_counts function does its job properly, but its only ever given the top level terms and so only counts the posts in those terms, and not any child terms.

A work-around (this is not particular efficient), is to get all categories and then filter out all but the top level ones. Then has far as get_categories (and so get_terms) is concerned - you are after all terms and so all get counted:

Awesome! Never knew about wp_list_filter() before. While not the most efficient, saves my sanity nonetheless. I can't give you the bounty as of yet (says I have to wait a little longer) but I'll jump back on shortly to try. Thanks again!
–
ZachApr 11 '12 at 15:03

Great Answer. But a small code typo error on line get_categories($args)); It has an extra closing bracket. I tried to edit but it is a single line and the system doesn't let me do that. Thanks
–
Vasanthan.R.PSep 11 '14 at 19:22