ID.'&echo=0&depth=1&sort_order=asc');
if ($children) { ?>
#msi', $children, $childrenIDs);
foreach($childrenIDs[1] as &$childID){
$count = count(explode("\n", wp_list_pages('title_li=&child_of='.$childID.'&echo=0&depth=1&sort_order=desc'))) - 1;
$match[] = '#- (.*?)
#msi';
if(intval($count) !== 0) $replace[] = "\t\t\t\t\t".'- \\3 ('.$count.')
';
else $replace[] = "\t\t\t\t\t".'- \\3
';
}
echo preg_replace($match, $replace, $children);
?>