diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Piwik.php b/module/VuFind/src/VuFind/View/Helper/Root/Piwik.php
index beca5b60912be18ffe92a976d68cf0e4263706b8..45266fe9fc22ae727bdec7ed06782940c323cff7 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/Piwik.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/Piwik.php
@@ -530,7 +530,7 @@ EOT;
         $searchType = $escape($params->getSearchType());
         $resultCount = 0;
         foreach ($combinedResults as $currentSearch) {
-            if ($currentSearch['ajax']) {
+            if (!empty($currentSearch['ajax'])) {
                 // Some results fetched via ajax, so report that we don't know the
                 // result count.
                 $resultCount = 'false';