Sample of calculating number of descendents in a node