I tried to use the Record Count functoid to map the number of sub-records of an record that itself occurs 0 to unbounded to a message with each record containing a field holding the number of sub-records:

root+ +root
| |
+foo+ +foo+
| |
+bar+ -RecordCount- barcount
|
+xyz

However my current map aggregates the count of all bar records and returns it in every foo\barcount.