$db = JFactory::getDbo();
		$uri =JURI::getInstance();
		$url= $uri->root();
		
		
		
		$query='SELECT * FROM #__naderapp_news WHERE published=1';
		$db->setQuery($query); 
		$parents=$db->loadObjectList();
		
		$totalnews=count($parents);
		
			
		
	if($totalnews>0)
{	
		
		
		 $arr = array('success' => '1','totalnews' => $totalnews);
   		 echo json_encode($arr);exit;
		
	}
	else
	{
		
		  $arr = array('success' => '0','totalnews' => 'No News Found');
 		  echo json_encode($arr);exit;
		
	}