You could try [[+idx]], which is updated for every resource pulled. Otherwise, a custom snippet something like this:
[[!getNumber? &parentId=`12`]]
<!--?php /* getNumber snippet */ $resources = $modx--->getCollection('modResource', array('parent'=>$parentId,'published'=>'1', 'deleted'=>'0')); return count($resources);