code: protected function getGroupDepth()
      {
          $depth = 0;
          foreach ($this->data['groupStacks'] as $stack) {
              $depth += \count($stack);
          }
          $depth += \count($this->data['groupPriorityStack']);
          return $depth;
      }
docs: Calculate total group depth
  
  @return integer