I know this is a very old thread, but it looks like no-one has solved this issue? So I decided to share what I did to implement a way of showing counts for a category hierarchy that includes the total images in subcategories. However, I found that it increased the number of SQL statements executed per page from around 25 to over 800, thus slowing down my pages. This was for a hierarchy of 163 categories up to 4 levels deep.
It involves a recursive function that starts from the top level and for each category finds all of its children, and all of its children's children, and so on, to build up a subcategory list for each category, which is then used to query the image table to get the total hierarchy counts.
I put the recursive function in functions.php and call it from globals.php to update the cat_cache with the results. I had then to put a fix into page_header.php otherwise the total_images value will double/triple/etc count the images in subcategories.
However because of the performance hit I decided to implement this in a different way which works for my site but may not be appropriate for other sites (I use my site as a way of distributing my catwalk fashion images to publishing clients, so I am the only person who uploads images and I normally do this in bulk via ftp). I made a plugin that does the same recursive hierarchy count but stores the results in a new field added to the categories table for each category. The population of cat_cache in globals.php is now just a single query to retrieve these values. Every time I do a bulk upload I run this plugin.
HTH,
Rob