Make sure that total results are numeric

See:
https://github.com/KorAP/Kustvakt/issues/668
which was fixed in
https://korap.ids-mannheim.de/gerrit/c/KorAP/Kustvakt/+/7526 , but not
yet rolled out in all KorAP instances

Change-Id: I64c61c35734472e52f6875c35b6e587fb252c4c1
diff --git a/R/KorAPQuery.R b/R/KorAPQuery.R
index c8da98e..5ead599 100644
--- a/R/KorAPQuery.R
+++ b/R/KorAPQuery.R
@@ -209,7 +209,7 @@
         message("API call failed.")
         totalResults <- 0
       } else {
-        totalResults <-res$meta$totalResults
+        totalResults <-as.integer(res$meta$totalResults)
         log_info(verbose, ": ", totalResults, " hits")
         if(!is.null(res$meta$cached))
           log_info(verbose, " [cached]\n")