code: protected function countItems($newsArchives, $blnFeatured)
  	{
  		// HOOK: add custom logic
  		if (isset($GLOBALS['TL_HOOKS']['newsListCountItems']) && \is_array($GLOBALS['TL_HOOKS']['newsListCountItems']))
  		{
  			foreach ($GLOBALS['TL_HOOKS']['newsListCountItems'] as $callback)
  			{
  				if (($intResult = System::importStatic($callback[0])->{$callback[1]}($newsArchives, $blnFeatured, $this)) === false)
  				{
  					continue;
  				}
  
  				if (\is_int($intResult))
  				{
  					return $intResult;
  				}
  			}
  		}
  
  		return NewsModel::countPublishedByPids($newsArchives, $blnFeatured);
  	}
docs: Count the total matching items
  
  @param array   $newsArchives
  @param boolean $blnFeatured
  
  @return integer