Hi,
Try with that code instead:
$db = JFactory::getDBO();
$db->setQuery('SELECT count(order_id) as number_of_orders FROM #__hikashop_order WHERE order_user_id = '.$row->user_id.' AND order_status IN (\'confirmed\',\'shipped\')');
echo ' ('.$db->loadResult().')';
Note that I didn't test the code. If you get an error or blank page, please activate the "error reporting" and "debug system" settings of the Joomla configuration and try again and you'll should get more information about the issue. Please provide the full error message so that I can correct the code.