Use the loadAssoc() method as in example below
$db = $this->getDbo();
$db->getQuery(true);
$db->setQuery("SELECT count(id) as count FROM #__database_table");
$count = $db->loadAssoc();
echo $count['count'];
Use the loadAssoc() method as in example below
$db = $this->getDbo();
$db->getQuery(true);
$db->setQuery("SELECT count(id) as count FROM #__database_table");
$count = $db->loadAssoc();
echo $count['count'];