some refinement for counting children