getNumberOfDescendants was correct for only 2 level, now it should work for any number of levels