See http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
Under the heading "Aggregate Functions in a Nested Set"
I'm trying to work out a query similar to the example given, except I want it to work at a sub-tree level, so if I queried for MP3 players I would get a result set like;
|NAME |COUNT|
----------------------
|MP3 PLAYERS | 2 | // 2 because 1 at this level and 1 at child level
|FLASH PLAYERS | 1 |