Model/ResourceModel/Category.php
public function getChildrenCount($categoryId)
    {
        $select = $this->getConnection()->select()->from(
            $this->getEntityTable(),
            'children_count'
        )->where(
            'entity_id = :entity_id'
        );
        $bind = ['entity_id' => $categoryId];

        return $this->getConnection()->fetchOne($select, $bind);
    }
public function getChildrenCount($categoryId)
    {
        $select = $this->getConnection()->select()->from(
            $this->getEntityTable(),
            'children_count'
        )->where(
            'entity_id = :entity_id'
        );
        $bind = ['entity_id' => $categoryId];

        return $this->getConnection()->fetchOne($select, $bind);
    }
public function getChildrenCount ( $ categoryId ) { $ select = $ this -> getConnection ( ) -> select ( ) -> from ( $ this -> getEntityTable ( ) , 'children_count' ) -> where ( 'entity_id = :entity_id' ) ; $ bind = [ 'entity_id' => $ categoryId ] ; return $ this -> getConnection ( ) -> fetchOne ( $ select , $ bind ) ; }
Get child categories count

@param int $categoryId
@return int
Get child categories count