$query_count = 'SELECT COUNT(*) as total FROM `xf_session`'; $query_count_total = XenForo_Application::get( 'db' )->fetchAll( $query_count ); print_r($query_count_total);
Array (  => Array ( [total] => 3 ) )
I realize this is wrong.
And - while you are smacking me for being silly - is there a better way to return the number of online guests? Did I miss a function already in XenForo?