app/Family.php
public function numberOfChildren(): int
    {
        $nchi = $this->children()->count();

        foreach ($this->facts(['NCHI']) as $fact) {
            $nchi = max($nchi, (int) $fact->value());
        }

        return $nchi;
    }
public function numberOfChildren(): int
    {
        $nchi = $this->children()->count();

        foreach ($this->facts(['NCHI']) as $fact) {
            $nchi = max($nchi, (int) $fact->value());
        }

        return $nchi;
    }
public function numberOfChildren ( ) : int { $ nchi = $ this -> children ( ) -> count ( ) ; foreach ( $ this -> facts ( [ 'NCHI' ] ) as $ fact ) { $ nchi = max ( $ nchi , ( int ) $ fact -> value ( ) ) ; } return $ nchi ; }
Number of children - for the individual list

@return int
Number of children - for the individual list