/**
* Used for discovering extensions
*
* @return integer The count of discovered extensions
*
* @throws \Exception
*
* @since 4.0.0
*/
public function processDiscover() : int
{
$app = $this->getApplication();
$mvcFactory = $app->bootComponent('com_installer')->getMVCFactory();
$model = $mvcFactory->createModel('Discover', 'Administrator');
return $model->discover();
}