I added several features for working with children to the setPlaceholders extra (
http://modx.com/extras/package/setplaceholders ) recently. It can get a count of the immediate children for any resource, or get a field/TV from a particular child (counting from the first or last), or from a random child.
Return the number of children for the current resource:
[[setPlaceholders? &ph=`childC` &output=`1`]]
Set a placeholder [[+childcount]] with the number of children the current resource's parent has:
[[setPlaceholders? &id=`[[*parent]]` &ph=`childcount == childC`]]
or [[setPlaceholders? &ph=`childcount == parent.childC`]]
Or something crazy:
[[setPlaceholders? &ph=`umm == 13.Uparent2.next3.child-2.pagetitle`]]
Which starts at resource 13, goes to its 2nd highest level parent, skips forward 3 siblings and gets the pagetitle of that resource's 2nd-to-last child. Available in [[+umm]]. Though if you actually need that you may have bigger problems