Tree depth

in the last change of hierarchical projects base, there is a method where you can get the entire parents list. so you would only to check this list size.