merged back master to jarodwen/hotfix/issue461
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/CountVarToCountOneRule.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/CountVarToCountOneRule.java
index 2c223ee..4209968 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/CountVarToCountOneRule.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/optimizer/rules/CountVarToCountOneRule.java
@@ -3,7 +3,7 @@
 
 import org.apache.commons.lang3.mutable.Mutable;
 
-import edu.uci.ics.asterix.om.base.AInt32;
+import edu.uci.ics.asterix.om.base.AInt64;
 import edu.uci.ics.asterix.om.constants.AsterixConstantValue;
 import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -65,7 +65,7 @@
         if (((AbstractLogicalOperator) agg.getInputs().get(0).getValue()).getOperatorTag() != LogicalOperatorTag.NESTEDTUPLESOURCE) {
             return false;
         }
-        fun.getArguments().get(0).setValue(new ConstantExpression(new AsterixConstantValue(new AInt32(1))));
+        fun.getArguments().get(0).setValue(new ConstantExpression(new AsterixConstantValue(new AInt64(1L))));
         return true;
     }
 
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta10/meta10.1.adm b/asterix-app/src/test/resources/metadata/results/basic/meta10/meta10.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/metadata/results/basic/meta10/meta10.1.adm
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta10/meta10.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta11/meta11.1.adm b/asterix-app/src/test/resources/metadata/results/basic/meta11/meta11.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/metadata/results/basic/meta11/meta11.1.adm
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta11/meta11.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta13/meta13.1.adm b/asterix-app/src/test/resources/metadata/results/basic/meta13/meta13.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/metadata/results/basic/meta13/meta13.1.adm
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta13/meta13.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/metadata/results/basic/meta14/meta14.1.adm b/asterix-app/src/test/resources/metadata/results/basic/meta14/meta14.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/metadata/results/basic/meta14/meta14.1.adm
+++ b/asterix-app/src/test/resources/metadata/results/basic/meta14/meta14.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/count_01/count_01.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/count_01/count_01.1.adm
index e440e5c..138bb32 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/count_01/count_01.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/count_01/count_01.1.adm
@@ -1 +1 @@
-3
\ No newline at end of file
+3i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_01/count_empty_01.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_01/count_empty_01.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_01/count_empty_01.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_01/count_empty_01.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_02/count_empty_02.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_02/count_empty_02.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_02/count_empty_02.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/count_empty_02/count_empty_02.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/count_null/count_null.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/count_null/count_null.1.adm
index df462fe..52021ff 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/count_null/count_null.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/count_null/count_null.1.adm
@@ -1 +1 @@
-{ "count": 2 }
\ No newline at end of file
+{ "count": 2i64 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm
index bf0d87a..3499a25 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/issue395/issue395.1.adm
@@ -1 +1 @@
-4
\ No newline at end of file
+4i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_0/issue412_0.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_0/issue412_0.1.adm
index e440e5c..138bb32 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_0/issue412_0.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_0/issue412_0.1.adm
@@ -1 +1 @@
-3
\ No newline at end of file
+3i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_1/issue412_1.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_1/issue412_1.1.adm
index 7c1107a..96e82eb 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_1/issue412_1.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/issue412_1/issue412_1.1.adm
@@ -1 +1 @@
-{ "count": 3, "average": null, "sum": null, "min": null, "max": null }
\ No newline at end of file
+{ "count": 3i64, "average": null, "sum": null, "min": null, "max": null }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/query-issue400/query-issue400.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/query-issue400/query-issue400.1.adm
index d8263ee..ceea233 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/query-issue400/query-issue400.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/query-issue400/query-issue400.1.adm
@@ -1 +1 @@
-2
\ No newline at end of file
+2i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count/scalar_count.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count/scalar_count.1.adm
index 80f0b99..ae579fc 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count/scalar_count.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count/scalar_count.1.adm
@@ -1,7 +1,7 @@
-3
-3
-3
-3
-3
-3
-3
\ No newline at end of file
+3i64
+3i64
+3i64
+3i64
+3i64
+3i64
+3i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_empty/scalar_count_empty.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_empty/scalar_count_empty.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_empty/scalar_count_empty.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_empty/scalar_count_empty.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_null/scalar_count_null.1.adm b/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_null/scalar_count_null.1.adm
index 4ff1111..c9eca6b 100644
--- a/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_null/scalar_count_null.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/aggregate/scalar_count_null/scalar_count_null.1.adm
@@ -1,7 +1,7 @@
-4
-4
-4
-4
-4
-4
-4
\ No newline at end of file
+4i64
+4i64
+4i64
+4i64
+4i64
+4i64
+4i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv03/cross-dv03.1.adm b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv03/cross-dv03.1.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv03/cross-dv03.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/cross-dataverse/cross-dv03/cross-dv03.1.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/runtimets/results/dapd/q2/q2.1.adm b/asterix-app/src/test/resources/runtimets/results/dapd/q2/q2.1.adm
index 878b172..db93d69 100644
--- a/asterix-app/src/test/resources/runtimets/results/dapd/q2/q2.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/dapd/q2/q2.1.adm
@@ -1,2 +1,2 @@
-{ "sig_id": 14, "total_count": 3, "chapter_breakdown": [ { "chapter_name": "Laguna Beach", "escount": 2 }, { "chapter_name": "San Clemente", "escount": 1 } ] }
-{ "sig_id": 31, "total_count": 1, "chapter_breakdown": [ { "chapter_name": "Huntington Beach", "escount": 1 } ] }
+{ "sig_id": 14, "total_count": 3i64, "chapter_breakdown": [ { "chapter_name": "Laguna Beach", "escount": 2i64 }, { "chapter_name": "San Clemente", "escount": 1i64 } ] }
+{ "sig_id": 31, "total_count": 1i64, "chapter_breakdown": [ { "chapter_name": "Huntington Beach", "escount": 1i64 } ] }
diff --git a/asterix-app/src/test/resources/runtimets/results/dml/query-issue382/query-issue382.1.adm b/asterix-app/src/test/resources/runtimets/results/dml/query-issue382/query-issue382.1.adm
index 9a03714..a2435a9 100644
--- a/asterix-app/src/test/resources/runtimets/results/dml/query-issue382/query-issue382.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/dml/query-issue382/query-issue382.1.adm
@@ -1 +1 @@
-10
\ No newline at end of file
+10i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_02/hdfs_02.1.adm b/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_02/hdfs_02.1.adm
index d7ae022..2b16e3a 100644
--- a/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_02/hdfs_02.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_02/hdfs_02.1.adm
@@ -1,5 +1,5 @@
-{ "word": "am", "count": 1 }
-{ "word": "grover", "count": 1 }
-{ "word": "hi", "count": 1 }
-{ "word": "i", "count": 1 }
-{ "word": "raman", "count": 1 }
+{ "word": "am", "count": 1i64 }
+{ "word": "grover", "count": 1i64 }
+{ "word": "hi", "count": 1i64 }
+{ "word": "i", "count": 1i64 }
+{ "word": "raman", "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_03/hdfs_03.1.adm b/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_03/hdfs_03.1.adm
index 1033913..586de6f 100644
--- a/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_03/hdfs_03.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/hdfs/hdfs_03/hdfs_03.1.adm
@@ -1,93 +1,93 @@
-{ "word": "a", "count": 68 }
-{ "word": "addressing", "count": 34 }
-{ "word": "an", "count": 34 }
-{ "word": "analyzing", "count": 68 }
-{ "word": "and", "count": 238 }
-{ "word": "areas", "count": 34 }
-{ "word": "asterix", "count": 102 }
-{ "word": "by", "count": 34 }
-{ "word": "cases", "count": 68 }
-{ "word": "clusters", "count": 68 }
-{ "word": "combining", "count": 34 }
-{ "word": "commodity", "count": 34 }
-{ "word": "computing", "count": 102 }
-{ "word": "content", "count": 34 }
-{ "word": "create", "count": 34 }
-{ "word": "data", "count": 238 }
-{ "word": "database", "count": 34 }
-{ "word": "databases", "count": 34 }
-{ "word": "datum", "count": 34 }
-{ "word": "declarative", "count": 34 }
-{ "word": "developing", "count": 34 }
-{ "word": "distinct", "count": 34 }
-{ "word": "each", "count": 34 }
-{ "word": "for", "count": 34 }
-{ "word": "formats", "count": 34 }
-{ "word": "from", "count": 68 }
-{ "word": "generation", "count": 34 }
-{ "word": "highly", "count": 68 }
-{ "word": "ideas", "count": 34 }
-{ "word": "including", "count": 34 }
-{ "word": "indexing", "count": 68 }
-{ "word": "information", "count": 136 }
-{ "word": "ingesting", "count": 34 }
-{ "word": "intensive", "count": 68 }
-{ "word": "irregular", "count": 34 }
-{ "word": "is", "count": 204 }
-{ "word": "issues", "count": 34 }
-{ "word": "large", "count": 68 }
-{ "word": "managing", "count": 34 }
-{ "word": "merging", "count": 34 }
-{ "word": "much", "count": 34 }
-{ "word": "new", "count": 34 }
-{ "word": "next", "count": 34 }
-{ "word": "nothing", "count": 34 }
-{ "word": "of", "count": 136 }
-{ "word": "on", "count": 102 }
-{ "word": "open", "count": 68 }
-{ "word": "parallel", "count": 68 }
-{ "word": "performant", "count": 34 }
-{ "word": "platform", "count": 34 }
-{ "word": "problem", "count": 34 }
-{ "word": "processing", "count": 34 }
-{ "word": "project", "count": 68 }
-{ "word": "quantities", "count": 34 }
-{ "word": "query", "count": 34 }
-{ "word": "querying", "count": 34 }
-{ "word": "range", "count": 34 }
-{ "word": "ranging", "count": 34 }
-{ "word": "regular", "count": 34 }
-{ "word": "research", "count": 34 }
-{ "word": "running", "count": 34 }
-{ "word": "scalable", "count": 34 }
-{ "word": "scales", "count": 34 }
-{ "word": "semi", "count": 170 }
-{ "word": "shared", "count": 34 }
-{ "word": "software", "count": 34 }
-{ "word": "solutions", "count": 34 }
-{ "word": "source", "count": 34 }
-{ "word": "stance", "count": 34 }
-{ "word": "storage", "count": 34 }
-{ "word": "storing", "count": 34 }
-{ "word": "structured", "count": 170 }
-{ "word": "subscribing", "count": 34 }
-{ "word": "support", "count": 34 }
-{ "word": "tagged", "count": 34 }
-{ "word": "taking", "count": 34 }
-{ "word": "targets", "count": 34 }
-{ "word": "techniques", "count": 68 }
-{ "word": "technologies", "count": 34 }
-{ "word": "textual", "count": 34 }
-{ "word": "that", "count": 34 }
-{ "word": "the", "count": 102 }
-{ "word": "three", "count": 34 }
-{ "word": "to", "count": 170 }
-{ "word": "todays", "count": 34 }
-{ "word": "use", "count": 68 }
-{ "word": "vast", "count": 34 }
-{ "word": "very", "count": 34 }
-{ "word": "well", "count": 34 }
-{ "word": "where", "count": 68 }
-{ "word": "wide", "count": 34 }
-{ "word": "with", "count": 34 }
-{ "word": "yet", "count": 34 }
+{ "word": "a", "count": 68i64 }
+{ "word": "addressing", "count": 34i64 }
+{ "word": "an", "count": 34i64 }
+{ "word": "analyzing", "count": 68i64 }
+{ "word": "and", "count": 238i64 }
+{ "word": "areas", "count": 34i64 }
+{ "word": "asterix", "count": 102i64 }
+{ "word": "by", "count": 34i64 }
+{ "word": "cases", "count": 68i64 }
+{ "word": "clusters", "count": 68i64 }
+{ "word": "combining", "count": 34i64 }
+{ "word": "commodity", "count": 34i64 }
+{ "word": "computing", "count": 102i64 }
+{ "word": "content", "count": 34i64 }
+{ "word": "create", "count": 34i64 }
+{ "word": "data", "count": 238i64 }
+{ "word": "database", "count": 34i64 }
+{ "word": "databases", "count": 34i64 }
+{ "word": "datum", "count": 34i64 }
+{ "word": "declarative", "count": 34i64 }
+{ "word": "developing", "count": 34i64 }
+{ "word": "distinct", "count": 34i64 }
+{ "word": "each", "count": 34i64 }
+{ "word": "for", "count": 34i64 }
+{ "word": "formats", "count": 34i64 }
+{ "word": "from", "count": 68i64 }
+{ "word": "generation", "count": 34i64 }
+{ "word": "highly", "count": 68i64 }
+{ "word": "ideas", "count": 34i64 }
+{ "word": "including", "count": 34i64 }
+{ "word": "indexing", "count": 68i64 }
+{ "word": "information", "count": 136i64 }
+{ "word": "ingesting", "count": 34i64 }
+{ "word": "intensive", "count": 68i64 }
+{ "word": "irregular", "count": 34i64 }
+{ "word": "is", "count": 204i64 }
+{ "word": "issues", "count": 34i64 }
+{ "word": "large", "count": 68i64 }
+{ "word": "managing", "count": 34i64 }
+{ "word": "merging", "count": 34i64 }
+{ "word": "much", "count": 34i64 }
+{ "word": "new", "count": 34i64 }
+{ "word": "next", "count": 34i64 }
+{ "word": "nothing", "count": 34i64 }
+{ "word": "of", "count": 136i64 }
+{ "word": "on", "count": 102i64 }
+{ "word": "open", "count": 68i64 }
+{ "word": "parallel", "count": 68i64 }
+{ "word": "performant", "count": 34i64 }
+{ "word": "platform", "count": 34i64 }
+{ "word": "problem", "count": 34i64 }
+{ "word": "processing", "count": 34i64 }
+{ "word": "project", "count": 68i64 }
+{ "word": "quantities", "count": 34i64 }
+{ "word": "query", "count": 34i64 }
+{ "word": "querying", "count": 34i64 }
+{ "word": "range", "count": 34i64 }
+{ "word": "ranging", "count": 34i64 }
+{ "word": "regular", "count": 34i64 }
+{ "word": "research", "count": 34i64 }
+{ "word": "running", "count": 34i64 }
+{ "word": "scalable", "count": 34i64 }
+{ "word": "scales", "count": 34i64 }
+{ "word": "semi", "count": 170i64 }
+{ "word": "shared", "count": 34i64 }
+{ "word": "software", "count": 34i64 }
+{ "word": "solutions", "count": 34i64 }
+{ "word": "source", "count": 34i64 }
+{ "word": "stance", "count": 34i64 }
+{ "word": "storage", "count": 34i64 }
+{ "word": "storing", "count": 34i64 }
+{ "word": "structured", "count": 170i64 }
+{ "word": "subscribing", "count": 34i64 }
+{ "word": "support", "count": 34i64 }
+{ "word": "tagged", "count": 34i64 }
+{ "word": "taking", "count": 34i64 }
+{ "word": "targets", "count": 34i64 }
+{ "word": "techniques", "count": 68i64 }
+{ "word": "technologies", "count": 34i64 }
+{ "word": "textual", "count": 34i64 }
+{ "word": "that", "count": 34i64 }
+{ "word": "the", "count": 102i64 }
+{ "word": "three", "count": 34i64 }
+{ "word": "to", "count": 170i64 }
+{ "word": "todays", "count": 34i64 }
+{ "word": "use", "count": 68i64 }
+{ "word": "vast", "count": 34i64 }
+{ "word": "very", "count": 34i64 }
+{ "word": "well", "count": 34i64 }
+{ "word": "where", "count": 68i64 }
+{ "word": "wide", "count": 34i64 }
+{ "word": "with", "count": 34i64 }
+{ "word": "yet", "count": 34i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.1.adm b/asterix-app/src/test/resources/runtimets/results/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.1.adm
index d7ae022..2b16e3a 100644
--- a/asterix-app/src/test/resources/runtimets/results/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/hints/issue_251_dataset_hint_6/issue_251_dataset_hint_6.1.adm
@@ -1,5 +1,5 @@
-{ "word": "am", "count": 1 }
-{ "word": "grover", "count": 1 }
-{ "word": "hi", "count": 1 }
-{ "word": "i", "count": 1 }
-{ "word": "raman", "count": 1 }
+{ "word": "am", "count": 1i64 }
+{ "word": "grover", "count": 1i64 }
+{ "word": "hi", "count": 1i64 }
+{ "word": "i", "count": 1i64 }
+{ "word": "raman", "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/load/issue289_query/issue289_query.1.adm b/asterix-app/src/test/resources/runtimets/results/load/issue289_query/issue289_query.1.adm
index 9a03714..a2435a9 100644
--- a/asterix-app/src/test/resources/runtimets/results/load/issue289_query/issue289_query.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/load/issue289_query/issue289_query.1.adm
@@ -1 +1 @@
-10
\ No newline at end of file
+10i64
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/misc/groupby-orderby-count/groupby-orderby-count.1.adm b/asterix-app/src/test/resources/runtimets/results/misc/groupby-orderby-count/groupby-orderby-count.1.adm
index 67a5aa6..04a533a 100644
--- a/asterix-app/src/test/resources/runtimets/results/misc/groupby-orderby-count/groupby-orderby-count.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/misc/groupby-orderby-count/groupby-orderby-count.1.adm
@@ -1,154 +1,154 @@
-{ "word": "allergies", "count": 15 }
-{ "word": "asthma", "count": 7 }
-{ "word": "and", "count": 6 }
-{ "word": "lt", "count": 6 }
-{ "word": "my", "count": 6 }
-{ "word": "the", "count": 6 }
-{ "word": "got", "count": 4 }
-{ "word": "i", "count": 4 }
-{ "word": "me", "count": 4 }
-{ "word": "that", "count": 4 }
-{ "word": "up", "count": 4 }
-{ "word": "an", "count": 3 }
-{ "word": "to", "count": 3 }
-{ "word": "with", "count": 3 }
-{ "word": "you", "count": 3 }
-{ "word": "a", "count": 2 }
-{ "word": "act", "count": 2 }
-{ "word": "acting", "count": 2 }
-{ "word": "away", "count": 2 }
-{ "word": "cough", "count": 2 }
-{ "word": "damn", "count": 2 }
-{ "word": "go", "count": 2 }
-{ "word": "hate", "count": 2 }
-{ "word": "he", "count": 2 }
-{ "word": "im", "count": 2 }
-{ "word": "in", "count": 2 }
-{ "word": "it", "count": 2 }
-{ "word": "lol", "count": 2 }
-{ "word": "natural", "count": 2 }
-{ "word": "please", "count": 2 }
-{ "word": "pump", "count": 2 }
-{ "word": "quot", "count": 2 }
-{ "word": "she", "count": 2 }
-{ "word": "smh", "count": 2 }
-{ "word": "sneezing", "count": 2 }
-{ "word": "while", "count": 2 }
-{ "word": "about", "count": 1 }
-{ "word": "actually", "count": 1 }
-{ "word": "again", "count": 1 }
-{ "word": "are", "count": 1 }
-{ "word": "at", "count": 1 }
-{ "word": "awesome", "count": 1 }
-{ "word": "back", "count": 1 }
-{ "word": "be", "count": 1 }
-{ "word": "been", "count": 1 }
-{ "word": "begin", "count": 1 }
-{ "word": "being", "count": 1 }
-{ "word": "birthday", "count": 1 }
-{ "word": "bit", "count": 1 }
-{ "word": "bravoandy", "count": 1 }
-{ "word": "but", "count": 1 }
-{ "word": "cant", "count": 1 }
-{ "word": "cause", "count": 1 }
-{ "word": "cold", "count": 1 }
-{ "word": "commercial", "count": 1 }
-{ "word": "coughing", "count": 1 }
-{ "word": "could", "count": 1 }
-{ "word": "crazy", "count": 1 }
-{ "word": "deal", "count": 1 }
-{ "word": "digging", "count": 1 }
-{ "word": "dirt", "count": 1 }
-{ "word": "ears", "count": 1 }
-{ "word": "except", "count": 1 }
-{ "word": "exposure", "count": 1 }
-{ "word": "eye", "count": 1 }
-{ "word": "feel", "count": 1 }
-{ "word": "fish", "count": 1 }
-{ "word": "following", "count": 1 }
-{ "word": "from", "count": 1 }
-{ "word": "fuckin", "count": 1 }
-{ "word": "glasses", "count": 1 }
-{ "word": "gold", "count": 1 }
-{ "word": "goldennote6", "count": 1 }
-{ "word": "gooodd", "count": 1 }
-{ "word": "gt", "count": 1 }
-{ "word": "haha", "count": 1 }
-{ "word": "have", "count": 1 }
-{ "word": "having", "count": 1 }
-{ "word": "heavy", "count": 1 }
-{ "word": "hell", "count": 1 }
-{ "word": "home", "count": 1 }
-{ "word": "house", "count": 1 }
-{ "word": "http", "count": 1 }
-{ "word": "idk", "count": 1 }
-{ "word": "incrediblel", "count": 1 }
-{ "word": "is", "count": 1 }
-{ "word": "issues", "count": 1 }
-{ "word": "itch", "count": 1 }
-{ "word": "itscrystal320", "count": 1 }
-{ "word": "just", "count": 1 }
-{ "word": "keep", "count": 1 }
-{ "word": "killing", "count": 1 }
-{ "word": "knew", "count": 1 }
-{ "word": "know", "count": 1 }
-{ "word": "like", "count": 1 }
-{ "word": "lmmmaaaoooo", "count": 1 }
-{ "word": "ly", "count": 1 }
-{ "word": "maam", "count": 1 }
-{ "word": "makes", "count": 1 }
-{ "word": "mnwnjo", "count": 1 }
-{ "word": "mommy", "count": 1 }
-{ "word": "much", "count": 1 }
-{ "word": "needs", "count": 1 }
-{ "word": "never", "count": 1 }
-{ "word": "new", "count": 1 }
-{ "word": "nnnnooo", "count": 1 }
-{ "word": "nothing", "count": 1 }
-{ "word": "now", "count": 1 }
-{ "word": "of", "count": 1 }
-{ "word": "omg", "count": 1 }
-{ "word": "one", "count": 1 }
-{ "word": "or", "count": 1 }
-{ "word": "over", "count": 1 }
-{ "word": "papisfavwave", "count": 1 }
-{ "word": "pass", "count": 1 }
-{ "word": "pollution", "count": 1 }
-{ "word": "remedy", "count": 1 }
-{ "word": "repeated", "count": 1 }
-{ "word": "rock", "count": 1 }
-{ "word": "sick", "count": 1 }
-{ "word": "skin", "count": 1 }
-{ "word": "sleeping", "count": 1 }
-{ "word": "smokers", "count": 1 }
-{ "word": "snapped", "count": 1 }
-{ "word": "snorting", "count": 1 }
-{ "word": "so", "count": 1 }
-{ "word": "specifically", "count": 1 }
-{ "word": "splashing", "count": 1 }
-{ "word": "stand", "count": 1 }
-{ "word": "still", "count": 1 }
-{ "word": "study", "count": 1 }
-{ "word": "sure", "count": 1 }
-{ "word": "swollen", "count": 1 }
-{ "word": "thats", "count": 1 }
-{ "word": "thingsicanlivewithout", "count": 1 }
-{ "word": "this", "count": 1 }
-{ "word": "though", "count": 1 }
-{ "word": "times", "count": 1 }
-{ "word": "tinalee90", "count": 1 }
-{ "word": "tired", "count": 1 }
-{ "word": "trying", "count": 1 }
-{ "word": "u", "count": 1 }
-{ "word": "ur", "count": 1 }
-{ "word": "was", "count": 1 }
-{ "word": "water", "count": 1 }
-{ "word": "way", "count": 1 }
-{ "word": "whats", "count": 1 }
-{ "word": "who", "count": 1 }
-{ "word": "why", "count": 1 }
-{ "word": "worst", "count": 1 }
-{ "word": "wrong", "count": 1 }
-{ "word": "x", "count": 1 }
-{ "word": "yeah", "count": 1 }
-{ "word": "your", "count": 1 }
+{ "word": "allergies", "count": 15i64 }
+{ "word": "asthma", "count": 7i64 }
+{ "word": "and", "count": 6i64 }
+{ "word": "lt", "count": 6i64 }
+{ "word": "my", "count": 6i64 }
+{ "word": "the", "count": 6i64 }
+{ "word": "got", "count": 4i64 }
+{ "word": "i", "count": 4i64 }
+{ "word": "me", "count": 4i64 }
+{ "word": "that", "count": 4i64 }
+{ "word": "up", "count": 4i64 }
+{ "word": "an", "count": 3i64 }
+{ "word": "to", "count": 3i64 }
+{ "word": "with", "count": 3i64 }
+{ "word": "you", "count": 3i64 }
+{ "word": "a", "count": 2i64 }
+{ "word": "act", "count": 2i64 }
+{ "word": "acting", "count": 2i64 }
+{ "word": "away", "count": 2i64 }
+{ "word": "cough", "count": 2i64 }
+{ "word": "damn", "count": 2i64 }
+{ "word": "go", "count": 2i64 }
+{ "word": "hate", "count": 2i64 }
+{ "word": "he", "count": 2i64 }
+{ "word": "im", "count": 2i64 }
+{ "word": "in", "count": 2i64 }
+{ "word": "it", "count": 2i64 }
+{ "word": "lol", "count": 2i64 }
+{ "word": "natural", "count": 2i64 }
+{ "word": "please", "count": 2i64 }
+{ "word": "pump", "count": 2i64 }
+{ "word": "quot", "count": 2i64 }
+{ "word": "she", "count": 2i64 }
+{ "word": "smh", "count": 2i64 }
+{ "word": "sneezing", "count": 2i64 }
+{ "word": "while", "count": 2i64 }
+{ "word": "about", "count": 1i64 }
+{ "word": "actually", "count": 1i64 }
+{ "word": "again", "count": 1i64 }
+{ "word": "are", "count": 1i64 }
+{ "word": "at", "count": 1i64 }
+{ "word": "awesome", "count": 1i64 }
+{ "word": "back", "count": 1i64 }
+{ "word": "be", "count": 1i64 }
+{ "word": "been", "count": 1i64 }
+{ "word": "begin", "count": 1i64 }
+{ "word": "being", "count": 1i64 }
+{ "word": "birthday", "count": 1i64 }
+{ "word": "bit", "count": 1i64 }
+{ "word": "bravoandy", "count": 1i64 }
+{ "word": "but", "count": 1i64 }
+{ "word": "cant", "count": 1i64 }
+{ "word": "cause", "count": 1i64 }
+{ "word": "cold", "count": 1i64 }
+{ "word": "commercial", "count": 1i64 }
+{ "word": "coughing", "count": 1i64 }
+{ "word": "could", "count": 1i64 }
+{ "word": "crazy", "count": 1i64 }
+{ "word": "deal", "count": 1i64 }
+{ "word": "digging", "count": 1i64 }
+{ "word": "dirt", "count": 1i64 }
+{ "word": "ears", "count": 1i64 }
+{ "word": "except", "count": 1i64 }
+{ "word": "exposure", "count": 1i64 }
+{ "word": "eye", "count": 1i64 }
+{ "word": "feel", "count": 1i64 }
+{ "word": "fish", "count": 1i64 }
+{ "word": "following", "count": 1i64 }
+{ "word": "from", "count": 1i64 }
+{ "word": "fuckin", "count": 1i64 }
+{ "word": "glasses", "count": 1i64 }
+{ "word": "gold", "count": 1i64 }
+{ "word": "goldennote6", "count": 1i64 }
+{ "word": "gooodd", "count": 1i64 }
+{ "word": "gt", "count": 1i64 }
+{ "word": "haha", "count": 1i64 }
+{ "word": "have", "count": 1i64 }
+{ "word": "having", "count": 1i64 }
+{ "word": "heavy", "count": 1i64 }
+{ "word": "hell", "count": 1i64 }
+{ "word": "home", "count": 1i64 }
+{ "word": "house", "count": 1i64 }
+{ "word": "http", "count": 1i64 }
+{ "word": "idk", "count": 1i64 }
+{ "word": "incrediblel", "count": 1i64 }
+{ "word": "is", "count": 1i64 }
+{ "word": "issues", "count": 1i64 }
+{ "word": "itch", "count": 1i64 }
+{ "word": "itscrystal320", "count": 1i64 }
+{ "word": "just", "count": 1i64 }
+{ "word": "keep", "count": 1i64 }
+{ "word": "killing", "count": 1i64 }
+{ "word": "knew", "count": 1i64 }
+{ "word": "know", "count": 1i64 }
+{ "word": "like", "count": 1i64 }
+{ "word": "lmmmaaaoooo", "count": 1i64 }
+{ "word": "ly", "count": 1i64 }
+{ "word": "maam", "count": 1i64 }
+{ "word": "makes", "count": 1i64 }
+{ "word": "mnwnjo", "count": 1i64 }
+{ "word": "mommy", "count": 1i64 }
+{ "word": "much", "count": 1i64 }
+{ "word": "needs", "count": 1i64 }
+{ "word": "never", "count": 1i64 }
+{ "word": "new", "count": 1i64 }
+{ "word": "nnnnooo", "count": 1i64 }
+{ "word": "nothing", "count": 1i64 }
+{ "word": "now", "count": 1i64 }
+{ "word": "of", "count": 1i64 }
+{ "word": "omg", "count": 1i64 }
+{ "word": "one", "count": 1i64 }
+{ "word": "or", "count": 1i64 }
+{ "word": "over", "count": 1i64 }
+{ "word": "papisfavwave", "count": 1i64 }
+{ "word": "pass", "count": 1i64 }
+{ "word": "pollution", "count": 1i64 }
+{ "word": "remedy", "count": 1i64 }
+{ "word": "repeated", "count": 1i64 }
+{ "word": "rock", "count": 1i64 }
+{ "word": "sick", "count": 1i64 }
+{ "word": "skin", "count": 1i64 }
+{ "word": "sleeping", "count": 1i64 }
+{ "word": "smokers", "count": 1i64 }
+{ "word": "snapped", "count": 1i64 }
+{ "word": "snorting", "count": 1i64 }
+{ "word": "so", "count": 1i64 }
+{ "word": "specifically", "count": 1i64 }
+{ "word": "splashing", "count": 1i64 }
+{ "word": "stand", "count": 1i64 }
+{ "word": "still", "count": 1i64 }
+{ "word": "study", "count": 1i64 }
+{ "word": "sure", "count": 1i64 }
+{ "word": "swollen", "count": 1i64 }
+{ "word": "thats", "count": 1i64 }
+{ "word": "thingsicanlivewithout", "count": 1i64 }
+{ "word": "this", "count": 1i64 }
+{ "word": "though", "count": 1i64 }
+{ "word": "times", "count": 1i64 }
+{ "word": "tinalee90", "count": 1i64 }
+{ "word": "tired", "count": 1i64 }
+{ "word": "trying", "count": 1i64 }
+{ "word": "u", "count": 1i64 }
+{ "word": "ur", "count": 1i64 }
+{ "word": "was", "count": 1i64 }
+{ "word": "water", "count": 1i64 }
+{ "word": "way", "count": 1i64 }
+{ "word": "whats", "count": 1i64 }
+{ "word": "who", "count": 1i64 }
+{ "word": "why", "count": 1i64 }
+{ "word": "worst", "count": 1i64 }
+{ "word": "wrong", "count": 1i64 }
+{ "word": "x", "count": 1i64 }
+{ "word": "yeah", "count": 1i64 }
+{ "word": "your", "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue208/query-issue208.1.adm b/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue208/query-issue208.1.adm
index 14c1c18..ad5b833 100644
--- a/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue208/query-issue208.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue208/query-issue208.1.adm
@@ -1,6 +1,6 @@
-{ "count": 1, "user": "RollandEckhard#500" }
-{ "count": 2, "user": "RollandEckhardstein#211" }
-{ "count": 1, "user": "RollandEckhardstein#221" }
-{ "count": 1, "user": "RollandEcstein#211" }
-{ "count": 1, "user": "Rolldstein#211" }
-{ "count": 1, "user": "Rolltein#211" }
+{ "count": 1i64, "user": "RollandEckhard#500" }
+{ "count": 2i64, "user": "RollandEckhardstein#211" }
+{ "count": 1i64, "user": "RollandEckhardstein#221" }
+{ "count": 1i64, "user": "RollandEcstein#211" }
+{ "count": 1i64, "user": "Rolldstein#211" }
+{ "count": 1i64, "user": "Rolltein#211" }
diff --git a/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue456/query-issue456.1.adm b/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue456/query-issue456.1.adm
index 0ca7b82..c989cc7 100644
--- a/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue456/query-issue456.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/open-closed/query-issue456/query-issue456.1.adm
@@ -1,2 +1,2 @@
-[ 1, 8 ]
-[ 2, 8 ]
+[ 1, 8i64 ]
+[ 2, 8i64 ]
diff --git a/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal/query-proposal.1.adm b/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal/query-proposal.1.adm
index 23ab1f6..ebac50d 100644
--- a/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal/query-proposal.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal/query-proposal.1.adm
@@ -1,5 +1,5 @@
-{ "topic": "at&t", "count": 1 }
-{ "topic": "att", "count": 1 }
-{ "topic": "commercials", "count": 1 }
-{ "topic": "iphone", "count": 1 }
-{ "topic": "verizon", "count": 3 }
+{ "topic": "at&t", "count": 1i64 }
+{ "topic": "att", "count": 1i64 }
+{ "topic": "commercials", "count": 1i64 }
+{ "topic": "iphone", "count": 1i64 }
+{ "topic": "verizon", "count": 3i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal02/query-proposal02.1.adm b/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal02/query-proposal02.1.adm
index 23ab1f6..ebac50d 100644
--- a/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal02/query-proposal02.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/open-closed/query-proposal02/query-proposal02.1.adm
@@ -1,5 +1,5 @@
-{ "topic": "at&t", "count": 1 }
-{ "topic": "att", "count": 1 }
-{ "topic": "commercials", "count": 1 }
-{ "topic": "iphone", "count": 1 }
-{ "topic": "verizon", "count": 3 }
+{ "topic": "at&t", "count": 1i64 }
+{ "topic": "att", "count": 1i64 }
+{ "topic": "commercials", "count": 1i64 }
+{ "topic": "iphone", "count": 1i64 }
+{ "topic": "verizon", "count": 3i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/semistructured/count-nullable/count-nullable.1.adm b/asterix-app/src/test/resources/runtimets/results/semistructured/count-nullable/count-nullable.1.adm
index 930767c..6b07aab 100644
--- a/asterix-app/src/test/resources/runtimets/results/semistructured/count-nullable/count-nullable.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/semistructured/count-nullable/count-nullable.1.adm
@@ -1,3 +1,3 @@
-{ "custage": null, "count": 2 }
-{ "custage": 10, "count": 1 }
-{ "custage": 15, "count": 1 }
+{ "custage": null, "count": 2i64 }
+{ "custage": 10, "count": 1i64 }
+{ "custage": 15, "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.1.adm b/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.1.adm
index 25859de..ab49c40 100644
--- a/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation-with-filtering/cell-aggregation-with-filtering.1.adm
@@ -1,2 +1,2 @@
-{ "cell": rectangle("33.5,-101.5 36.5,-98.5"), "count": 1 }
-{ "cell": rectangle("33.5,-98.5 36.5,-95.5"), "count": 2 }
\ No newline at end of file
+{ "cell": rectangle("33.5,-101.5 36.5,-98.5"), "count": 1i64 }
+{ "cell": rectangle("33.5,-98.5 36.5,-95.5"), "count": 2i64 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation/cell-aggregation.1.adm b/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation/cell-aggregation.1.adm
index 0014d49..ad3f71c 100644
--- a/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation/cell-aggregation.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/spatial/cell-aggregation/cell-aggregation.1.adm
@@ -1,3 +1,3 @@
-{ "cell": rectangle("5.0,5.0 10.0,10.0"), "count": 1 }
-{ "cell": rectangle("5.0,0.0 10.0,5.0"), "count": 3 }
-{ "cell": rectangle("0.0,0.0 5.0,5.0"), "count": 12 }
\ No newline at end of file
+{ "cell": rectangle("5.0,5.0 10.0,10.0"), "count": 1i64 }
+{ "cell": rectangle("5.0,0.0 10.0,5.0"), "count": 3i64 }
+{ "cell": rectangle("0.0,0.0 5.0,5.0"), "count": 12i64 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.14.adm b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.14.adm
index f599e28..125b90b 100644
--- a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.14.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.14.adm
@@ -1 +1 @@
-10
+10i64
diff --git a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.15.adm b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.15.adm
index 954b583..084aa59 100644
--- a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.15.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.15.adm
@@ -1,5 +1,5 @@
-{ "user": "ChangEwing_573", "count": 1 }
-{ "user": "ColineGeyer@63", "count": 3 }
-{ "user": "NathanGiesen@211", "count": 6 }
-{ "user": "NilaMilliron_tw", "count": 1 }
-{ "user": "OliJackson_512", "count": 1 }
+{ "user": "ChangEwing_573", "count": 1i64 }
+{ "user": "ColineGeyer@63", "count": 3i64 }
+{ "user": "NathanGiesen@211", "count": 6i64 }
+{ "user": "NilaMilliron_tw", "count": 1i64 }
+{ "user": "OliJackson_512", "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.16.adm b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.16.adm
index 954b583..084aa59 100644
--- a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.16.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.16.adm
@@ -1,5 +1,5 @@
-{ "user": "ChangEwing_573", "count": 1 }
-{ "user": "ColineGeyer@63", "count": 3 }
-{ "user": "NathanGiesen@211", "count": 6 }
-{ "user": "NilaMilliron_tw", "count": 1 }
-{ "user": "OliJackson_512", "count": 1 }
+{ "user": "ChangEwing_573", "count": 1i64 }
+{ "user": "ColineGeyer@63", "count": 3i64 }
+{ "user": "NathanGiesen@211", "count": 6i64 }
+{ "user": "NilaMilliron_tw", "count": 1i64 }
+{ "user": "OliJackson_512", "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.17.adm b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.17.adm
index c721153..689c29d 100644
--- a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.17.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.17.adm
@@ -1,3 +1,3 @@
-{ "user": "OliJackson_512", "count": 1 }
-{ "user": "NilaMilliron_tw", "count": 1 }
-{ "user": "ChangEwing_573", "count": 1 }
+{ "user": "OliJackson_512", "count": 1i64 }
+{ "user": "NilaMilliron_tw", "count": 1i64 }
+{ "user": "ChangEwing_573", "count": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.22.adm b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.22.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.22.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite/tinysocial-suite.22.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch/q13_customer_distribution/q13_customer_distribution.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch/q13_customer_distribution/q13_customer_distribution.1.adm
index 9257a84..e3ad301 100644
--- a/asterix-app/src/test/resources/runtimets/results/tpch/q13_customer_distribution/q13_customer_distribution.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tpch/q13_customer_distribution/q13_customer_distribution.1.adm
@@ -1,27 +1,27 @@
-{ "c_count": 0, "custdist": 50 }
-{ "c_count": 16, "custdist": 8 }
-{ "c_count": 17, "custdist": 7 }
-{ "c_count": 20, "custdist": 6 }
-{ "c_count": 13, "custdist": 6 }
-{ "c_count": 12, "custdist": 6 }
-{ "c_count": 9, "custdist": 6 }
-{ "c_count": 23, "custdist": 5 }
-{ "c_count": 14, "custdist": 5 }
-{ "c_count": 10, "custdist": 5 }
-{ "c_count": 21, "custdist": 4 }
-{ "c_count": 18, "custdist": 4 }
-{ "c_count": 11, "custdist": 4 }
-{ "c_count": 8, "custdist": 4 }
-{ "c_count": 7, "custdist": 4 }
-{ "c_count": 26, "custdist": 3 }
-{ "c_count": 22, "custdist": 3 }
-{ "c_count": 6, "custdist": 3 }
-{ "c_count": 5, "custdist": 3 }
-{ "c_count": 4, "custdist": 3 }
-{ "c_count": 29, "custdist": 2 }
-{ "c_count": 24, "custdist": 2 }
-{ "c_count": 19, "custdist": 2 }
-{ "c_count": 15, "custdist": 2 }
-{ "c_count": 28, "custdist": 1 }
-{ "c_count": 25, "custdist": 1 }
-{ "c_count": 3, "custdist": 1 }
+{ "c_count": 0i64, "custdist": 50i64 }
+{ "c_count": 16i64, "custdist": 8i64 }
+{ "c_count": 17i64, "custdist": 7i64 }
+{ "c_count": 20i64, "custdist": 6i64 }
+{ "c_count": 13i64, "custdist": 6i64 }
+{ "c_count": 12i64, "custdist": 6i64 }
+{ "c_count": 9i64, "custdist": 6i64 }
+{ "c_count": 23i64, "custdist": 5i64 }
+{ "c_count": 14i64, "custdist": 5i64 }
+{ "c_count": 10i64, "custdist": 5i64 }
+{ "c_count": 21i64, "custdist": 4i64 }
+{ "c_count": 18i64, "custdist": 4i64 }
+{ "c_count": 11i64, "custdist": 4i64 }
+{ "c_count": 8i64, "custdist": 4i64 }
+{ "c_count": 7i64, "custdist": 4i64 }
+{ "c_count": 26i64, "custdist": 3i64 }
+{ "c_count": 22i64, "custdist": 3i64 }
+{ "c_count": 6i64, "custdist": 3i64 }
+{ "c_count": 5i64, "custdist": 3i64 }
+{ "c_count": 4i64, "custdist": 3i64 }
+{ "c_count": 29i64, "custdist": 2i64 }
+{ "c_count": 24i64, "custdist": 2i64 }
+{ "c_count": 19i64, "custdist": 2i64 }
+{ "c_count": 15i64, "custdist": 2i64 }
+{ "c_count": 28i64, "custdist": 1i64 }
+{ "c_count": 25i64, "custdist": 1i64 }
+{ "c_count": 3i64, "custdist": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm
index 8f4490e..4e06408 100644
--- a/asterix-app/src/test/resources/runtimets/results/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.1.adm
@@ -1,34 +1,34 @@
-{ "p_brand": "Brand#11", "p_type": "PROMO ANODIZED TIN", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#11", "p_type": "SMALL PLATED COPPER", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#11", "p_type": "STANDARD POLISHED TIN", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#13", "p_type": "MEDIUM ANODIZED STEEL", "p_size": 36, "supplier_cnt": 4 }
-{ "p_brand": "Brand#14", "p_type": "SMALL ANODIZED NICKEL", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#15", "p_type": "LARGE ANODIZED BRASS", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#21", "p_type": "LARGE BURNISHED COPPER", "p_size": 19, "supplier_cnt": 4 }
-{ "p_brand": "Brand#23", "p_type": "ECONOMY BRUSHED COPPER", "p_size": 9, "supplier_cnt": 4 }
-{ "p_brand": "Brand#25", "p_type": "MEDIUM PLATED BRASS", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#31", "p_type": "ECONOMY PLATED STEEL", "p_size": 23, "supplier_cnt": 4 }
-{ "p_brand": "Brand#31", "p_type": "PROMO POLISHED TIN", "p_size": 23, "supplier_cnt": 4 }
-{ "p_brand": "Brand#32", "p_type": "MEDIUM BURNISHED BRASS", "p_size": 49, "supplier_cnt": 4 }
-{ "p_brand": "Brand#33", "p_type": "LARGE BRUSHED TIN", "p_size": 36, "supplier_cnt": 4 }
-{ "p_brand": "Brand#33", "p_type": "SMALL BURNISHED NICKEL", "p_size": 3, "supplier_cnt": 4 }
-{ "p_brand": "Brand#34", "p_type": "LARGE PLATED BRASS", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#34", "p_type": "MEDIUM BRUSHED COPPER", "p_size": 9, "supplier_cnt": 4 }
-{ "p_brand": "Brand#34", "p_type": "SMALL PLATED BRASS", "p_size": 14, "supplier_cnt": 4 }
-{ "p_brand": "Brand#35", "p_type": "STANDARD ANODIZED STEEL", "p_size": 23, "supplier_cnt": 4 }
-{ "p_brand": "Brand#43", "p_type": "PROMO POLISHED BRASS", "p_size": 19, "supplier_cnt": 4 }
-{ "p_brand": "Brand#43", "p_type": "SMALL BRUSHED NICKEL", "p_size": 9, "supplier_cnt": 4 }
-{ "p_brand": "Brand#44", "p_type": "SMALL PLATED COPPER", "p_size": 19, "supplier_cnt": 4 }
-{ "p_brand": "Brand#52", "p_type": "MEDIUM BURNISHED TIN", "p_size": 45, "supplier_cnt": 4 }
-{ "p_brand": "Brand#52", "p_type": "SMALL BURNISHED NICKEL", "p_size": 14, "supplier_cnt": 4 }
-{ "p_brand": "Brand#53", "p_type": "MEDIUM BRUSHED COPPER", "p_size": 3, "supplier_cnt": 4 }
-{ "p_brand": "Brand#55", "p_type": "STANDARD ANODIZED BRASS", "p_size": 36, "supplier_cnt": 4 }
-{ "p_brand": "Brand#55", "p_type": "STANDARD BRUSHED COPPER", "p_size": 3, "supplier_cnt": 4 }
-{ "p_brand": "Brand#13", "p_type": "SMALL BRUSHED NICKEL", "p_size": 19, "supplier_cnt": 2 }
-{ "p_brand": "Brand#25", "p_type": "SMALL BURNISHED COPPER", "p_size": 3, "supplier_cnt": 2 }
-{ "p_brand": "Brand#43", "p_type": "MEDIUM ANODIZED BRASS", "p_size": 14, "supplier_cnt": 2 }
-{ "p_brand": "Brand#53", "p_type": "STANDARD PLATED STEEL", "p_size": 45, "supplier_cnt": 2 }
-{ "p_brand": "Brand#24", "p_type": "MEDIUM PLATED STEEL", "p_size": 19, "supplier_cnt": 1 }
-{ "p_brand": "Brand#51", "p_type": "ECONOMY POLISHED STEEL", "p_size": 49, "supplier_cnt": 1 }
-{ "p_brand": "Brand#53", "p_type": "LARGE BURNISHED NICKEL", "p_size": 23, "supplier_cnt": 1 }
-{ "p_brand": "Brand#54", "p_type": "ECONOMY ANODIZED BRASS", "p_size": 9, "supplier_cnt": 1 }
+{ "p_brand": "Brand#11", "p_type": "PROMO ANODIZED TIN", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#11", "p_type": "SMALL PLATED COPPER", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#11", "p_type": "STANDARD POLISHED TIN", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#13", "p_type": "MEDIUM ANODIZED STEEL", "p_size": 36, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#14", "p_type": "SMALL ANODIZED NICKEL", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#15", "p_type": "LARGE ANODIZED BRASS", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#21", "p_type": "LARGE BURNISHED COPPER", "p_size": 19, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#23", "p_type": "ECONOMY BRUSHED COPPER", "p_size": 9, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#25", "p_type": "MEDIUM PLATED BRASS", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#31", "p_type": "ECONOMY PLATED STEEL", "p_size": 23, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#31", "p_type": "PROMO POLISHED TIN", "p_size": 23, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#32", "p_type": "MEDIUM BURNISHED BRASS", "p_size": 49, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#33", "p_type": "LARGE BRUSHED TIN", "p_size": 36, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#33", "p_type": "SMALL BURNISHED NICKEL", "p_size": 3, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#34", "p_type": "LARGE PLATED BRASS", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#34", "p_type": "MEDIUM BRUSHED COPPER", "p_size": 9, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#34", "p_type": "SMALL PLATED BRASS", "p_size": 14, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#35", "p_type": "STANDARD ANODIZED STEEL", "p_size": 23, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#43", "p_type": "PROMO POLISHED BRASS", "p_size": 19, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#43", "p_type": "SMALL BRUSHED NICKEL", "p_size": 9, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#44", "p_type": "SMALL PLATED COPPER", "p_size": 19, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#52", "p_type": "MEDIUM BURNISHED TIN", "p_size": 45, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#52", "p_type": "SMALL BURNISHED NICKEL", "p_size": 14, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#53", "p_type": "MEDIUM BRUSHED COPPER", "p_size": 3, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#55", "p_type": "STANDARD ANODIZED BRASS", "p_size": 36, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#55", "p_type": "STANDARD BRUSHED COPPER", "p_size": 3, "supplier_cnt": 4i64 }
+{ "p_brand": "Brand#13", "p_type": "SMALL BRUSHED NICKEL", "p_size": 19, "supplier_cnt": 2i64 }
+{ "p_brand": "Brand#25", "p_type": "SMALL BURNISHED COPPER", "p_size": 3, "supplier_cnt": 2i64 }
+{ "p_brand": "Brand#43", "p_type": "MEDIUM ANODIZED BRASS", "p_size": 14, "supplier_cnt": 2i64 }
+{ "p_brand": "Brand#53", "p_type": "STANDARD PLATED STEEL", "p_size": 45, "supplier_cnt": 2i64 }
+{ "p_brand": "Brand#24", "p_type": "MEDIUM PLATED STEEL", "p_size": 19, "supplier_cnt": 1i64 }
+{ "p_brand": "Brand#51", "p_type": "ECONOMY POLISHED STEEL", "p_size": 49, "supplier_cnt": 1i64 }
+{ "p_brand": "Brand#53", "p_type": "LARGE BURNISHED NICKEL", "p_size": 23, "supplier_cnt": 1i64 }
+{ "p_brand": "Brand#54", "p_type": "ECONOMY ANODIZED BRASS", "p_size": 9, "supplier_cnt": 1i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch/q1_pricing_summary_report_nt/q1_pricing_summary_report_nt.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch/q1_pricing_summary_report_nt/q1_pricing_summary_report_nt.1.adm
index cea2839..904031c 100644
--- a/asterix-app/src/test/resources/runtimets/results/tpch/q1_pricing_summary_report_nt/q1_pricing_summary_report_nt.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tpch/q1_pricing_summary_report_nt/q1_pricing_summary_report_nt.1.adm
@@ -1,4 +1,4 @@
-{ "l_returnflag": "A", "l_linestatus": "F", "sum_qty": 37474.0d, "sum_base_price": 3.7569624640000015E7d, "sum_disc_price": 3.567619209699997E7d, "sum_charge": 3.7101416222424E7d, "ave_qty": 25.354533152909337d, "ave_price": 25419.231826792973d, "ave_disc": 0.05086603518267936d, "count_order": 1478 }
-{ "l_returnflag": "N", "l_linestatus": "F", "sum_qty": 1041.0d, "sum_base_price": 1041301.0700000001d, "sum_disc_price": 999060.898d, "sum_charge": 1036450.8022800002d, "ave_qty": 27.394736842105264d, "ave_price": 27402.659736842106d, "ave_disc": 0.04289473684210526d, "count_order": 38 }
-{ "l_returnflag": "N", "l_linestatus": "O", "sum_qty": 75168.0d, "sum_base_price": 7.538495537000003E7d, "sum_disc_price": 7.165316630340004E7d, "sum_charge": 7.449879813307303E7d, "ave_qty": 25.558653519211152d, "ave_price": 25632.422771166282d, "ave_disc": 0.04969738184291074d, "count_order": 2941 }
-{ "l_returnflag": "R", "l_linestatus": "F", "sum_qty": 36511.0d, "sum_base_price": 3.657084124000002E7d, "sum_disc_price": 3.473847287579997E7d, "sum_charge": 3.616906011219299E7d, "ave_qty": 25.059025394646532d, "ave_price": 25100.09693891559d, "ave_disc": 0.05002745367192867d, "count_order": 1457 }
\ No newline at end of file
+{ "l_returnflag": "A", "l_linestatus": "F", "sum_qty": 37474.0d, "sum_base_price": 3.7569624640000015E7d, "sum_disc_price": 3.567619209699997E7d, "sum_charge": 3.7101416222424E7d, "ave_qty": 25.354533152909337d, "ave_price": 25419.231826792973d, "ave_disc": 0.05086603518267936d, "count_order": 1478i64 }
+{ "l_returnflag": "N", "l_linestatus": "F", "sum_qty": 1041.0d, "sum_base_price": 1041301.0700000001d, "sum_disc_price": 999060.898d, "sum_charge": 1036450.8022800002d, "ave_qty": 27.394736842105264d, "ave_price": 27402.659736842106d, "ave_disc": 0.04289473684210526d, "count_order": 38i64 }
+{ "l_returnflag": "N", "l_linestatus": "O", "sum_qty": 75168.0d, "sum_base_price": 7.538495537000003E7d, "sum_disc_price": 7.165316630340004E7d, "sum_charge": 7.449879813307303E7d, "ave_qty": 25.558653519211152d, "ave_price": 25632.422771166282d, "ave_disc": 0.04969738184291074d, "count_order": 2941i64 }
+{ "l_returnflag": "R", "l_linestatus": "F", "sum_qty": 36511.0d, "sum_base_price": 3.657084124000002E7d, "sum_disc_price": 3.473847287579997E7d, "sum_charge": 3.616906011219299E7d, "ave_qty": 25.059025394646532d, "ave_price": 25100.09693891559d, "ave_disc": 0.05002745367192867d, "count_order": 1457i64 }
\ No newline at end of file
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm
index 2ae0988..e9b0c46 100644
--- a/asterix-app/src/test/resources/runtimets/results/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tpch/q21_suppliers_who_kept_orders_waiting/q21_suppliers_who_kept_orders_waiting.1.adm
@@ -1,10 +1,10 @@
-{ "s_name": "Supplier#000000007", "numwait": 431 }
-{ "s_name": "Supplier#000000005", "numwait": 417 }
-{ "s_name": "Supplier#000000001", "numwait": 403 }
-{ "s_name": "Supplier#000000009", "numwait": 373 }
-{ "s_name": "Supplier#000000004", "numwait": 367 }
-{ "s_name": "Supplier#000000002", "numwait": 364 }
-{ "s_name": "Supplier#000000010", "numwait": 358 }
-{ "s_name": "Supplier#000000003", "numwait": 349 }
-{ "s_name": "Supplier#000000008", "numwait": 347 }
-{ "s_name": "Supplier#000000006", "numwait": 343 }
+{ "s_name": "Supplier#000000007", "numwait": 431i64 }
+{ "s_name": "Supplier#000000005", "numwait": 417i64 }
+{ "s_name": "Supplier#000000001", "numwait": 403i64 }
+{ "s_name": "Supplier#000000009", "numwait": 373i64 }
+{ "s_name": "Supplier#000000004", "numwait": 367i64 }
+{ "s_name": "Supplier#000000002", "numwait": 364i64 }
+{ "s_name": "Supplier#000000010", "numwait": 358i64 }
+{ "s_name": "Supplier#000000003", "numwait": 349i64 }
+{ "s_name": "Supplier#000000008", "numwait": 347i64 }
+{ "s_name": "Supplier#000000006", "numwait": 343i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm
index 4f3cd97..592270d 100644
--- a/asterix-app/src/test/resources/runtimets/results/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tpch/q22_global_sales_opportunity/q22_global_sales_opportunity.1.adm
@@ -1,23 +1,23 @@
-{ "cntrycode": "10", "numcust": 3, "totacctbal": 20747.13d }
-{ "cntrycode": "11", "numcust": 5, "totacctbal": 35208.88d }
-{ "cntrycode": "12", "numcust": 2, "totacctbal": 13735.27d }
-{ "cntrycode": "13", "numcust": 2, "totacctbal": 13545.3d }
-{ "cntrycode": "14", "numcust": 1, "totacctbal": 9963.15d }
-{ "cntrycode": "15", "numcust": 2, "totacctbal": 14624.84d }
-{ "cntrycode": "16", "numcust": 2, "totacctbal": 11239.02d }
-{ "cntrycode": "17", "numcust": 1, "totacctbal": 9127.27d }
-{ "cntrycode": "18", "numcust": 3, "totacctbal": 22156.91d }
-{ "cntrycode": "19", "numcust": 6, "totacctbal": 43758.41d }
-{ "cntrycode": "20", "numcust": 3, "totacctbal": 23085.67d }
-{ "cntrycode": "21", "numcust": 3, "totacctbal": 19400.52d }
-{ "cntrycode": "22", "numcust": 3, "totacctbal": 20332.18d }
-{ "cntrycode": "23", "numcust": 3, "totacctbal": 25483.06d }
-{ "cntrycode": "25", "numcust": 3, "totacctbal": 19038.36d }
-{ "cntrycode": "26", "numcust": 5, "totacctbal": 38943.9d }
-{ "cntrycode": "27", "numcust": 2, "totacctbal": 13248.06d }
-{ "cntrycode": "28", "numcust": 5, "totacctbal": 42700.5d }
-{ "cntrycode": "29", "numcust": 4, "totacctbal": 36059.01d }
-{ "cntrycode": "30", "numcust": 2, "totacctbal": 17528.46d }
-{ "cntrycode": "31", "numcust": 3, "totacctbal": 23599.109999999997d }
-{ "cntrycode": "32", "numcust": 4, "totacctbal": 25754.22d }
-{ "cntrycode": "33", "numcust": 3, "totacctbal": 20359.59d }
+{ "cntrycode": "10", "numcust": 3i64, "totacctbal": 20747.13d }
+{ "cntrycode": "11", "numcust": 5i64, "totacctbal": 35208.88d }
+{ "cntrycode": "12", "numcust": 2i64, "totacctbal": 13735.27d }
+{ "cntrycode": "13", "numcust": 2i64, "totacctbal": 13545.3d }
+{ "cntrycode": "14", "numcust": 1i64, "totacctbal": 9963.15d }
+{ "cntrycode": "15", "numcust": 2i64, "totacctbal": 14624.84d }
+{ "cntrycode": "16", "numcust": 2i64, "totacctbal": 11239.02d }
+{ "cntrycode": "17", "numcust": 1i64, "totacctbal": 9127.27d }
+{ "cntrycode": "18", "numcust": 3i64, "totacctbal": 22156.91d }
+{ "cntrycode": "19", "numcust": 6i64, "totacctbal": 43758.41d }
+{ "cntrycode": "20", "numcust": 3i64, "totacctbal": 23085.67d }
+{ "cntrycode": "21", "numcust": 3i64, "totacctbal": 19400.52d }
+{ "cntrycode": "22", "numcust": 3i64, "totacctbal": 20332.18d }
+{ "cntrycode": "23", "numcust": 3i64, "totacctbal": 25483.06d }
+{ "cntrycode": "25", "numcust": 3i64, "totacctbal": 19038.36d }
+{ "cntrycode": "26", "numcust": 5i64, "totacctbal": 38943.9d }
+{ "cntrycode": "27", "numcust": 2i64, "totacctbal": 13248.06d }
+{ "cntrycode": "28", "numcust": 5i64, "totacctbal": 42700.5d }
+{ "cntrycode": "29", "numcust": 4i64, "totacctbal": 36059.01d }
+{ "cntrycode": "30", "numcust": 2i64, "totacctbal": 17528.46d }
+{ "cntrycode": "31", "numcust": 3i64, "totacctbal": 23599.109999999997d }
+{ "cntrycode": "32", "numcust": 4i64, "totacctbal": 25754.22d }
+{ "cntrycode": "33", "numcust": 3i64, "totacctbal": 20359.59d }
diff --git a/asterix-app/src/test/resources/runtimets/results/tpch/q4_order_priority/q4_order_priority.1.adm b/asterix-app/src/test/resources/runtimets/results/tpch/q4_order_priority/q4_order_priority.1.adm
index 5e38c96..e7af18c 100644
--- a/asterix-app/src/test/resources/runtimets/results/tpch/q4_order_priority/q4_order_priority.1.adm
+++ b/asterix-app/src/test/resources/runtimets/results/tpch/q4_order_priority/q4_order_priority.1.adm
@@ -1,5 +1,5 @@
-{ "order_priority": "1-URGENT", "count": 9 }
-{ "order_priority": "2-HIGH", "count": 7 }
-{ "order_priority": "3-MEDIUM", "count": 9 }
-{ "order_priority": "4-NOT SPECIFIED", "count": 8 }
-{ "order_priority": "5-LOW", "count": 12 }
+{ "order_priority": "1-URGENT", "count": 9i64 }
+{ "order_priority": "2-HIGH", "count": 7i64 }
+{ "order_priority": "3-MEDIUM", "count": 9i64 }
+{ "order_priority": "4-NOT SPECIFIED", "count": 8i64 }
+{ "order_priority": "5-LOW", "count": 12i64 }
diff --git a/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.2.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.2.adm
index 0cfbf08..06e4a82 100644
--- a/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.2.adm
+++ b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.2.adm
@@ -1 +1 @@
-2
+2i64
diff --git a/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.4.adm b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.4.adm
index 573541a..2dd16db 100644
--- a/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.4.adm
+++ b/asterix-app/src/test/resources/runtimets/results/user-defined-functions/query-issue489/query-issue489.4.adm
@@ -1 +1 @@
-0
+0i64
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
index f717653..8e40200 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
@@ -18,6 +18,7 @@
 import edu.uci.ics.asterix.om.typecomputer.impl.ADoubleTypeComputer;
 import edu.uci.ics.asterix.om.typecomputer.impl.AFloatTypeComputer;
 import edu.uci.ics.asterix.om.typecomputer.impl.AInt32TypeComputer;
+import edu.uci.ics.asterix.om.typecomputer.impl.AInt64TypeComputer;
 import edu.uci.ics.asterix.om.typecomputer.impl.ALineTypeComputer;
 import edu.uci.ics.asterix.om.typecomputer.impl.ANullTypeComputer;
 import edu.uci.ics.asterix.om.typecomputer.impl.APointTypeComputer;
@@ -604,7 +605,7 @@
         addPrivateFunction(CONCAT_NON_NULL, ConcatNonNullTypeComputer.INSTANCE);
 
         addFunction(CONTAINS, ABooleanTypeComputer.INSTANCE);
-        addPrivateFunction(COUNT, AInt32TypeComputer.INSTANCE);
+        addPrivateFunction(COUNT, AInt64TypeComputer.INSTANCE);
         addFunction(COUNTHASHED_GRAM_TOKENS, OrderedListOfAInt32TypeComputer.INSTANCE);
         addPrivateFunction(COUNTHASHED_WORD_TOKENS, OrderedListOfAInt32TypeComputer.INSTANCE);
         addFunction(CREATE_CIRCLE, ACircleTypeComputer.INSTANCE);
@@ -711,8 +712,9 @@
         addFunction(RANGE, AInt32TypeComputer.INSTANCE);
         addFunction(RECTANGLE_CONSTRUCTOR, OptionalARectangleTypeComputer.INSTANCE);
         // add(RECORD_TYPE_CONSTRUCTOR, null);
+
         addFunction(SCALAR_AVG, ScalarVersionOfAggregateResultType.INSTANCE);
-        addFunction(SCALAR_COUNT, AInt32TypeComputer.INSTANCE);
+        addFunction(SCALAR_COUNT, AInt64TypeComputer.INSTANCE);
         addPrivateFunction(SCALAR_GLOBAL_AVG, ScalarVersionOfAggregateResultType.INSTANCE);
         addPrivateFunction(SCALAR_LOCAL_AVG, ScalarVersionOfAggregateResultType.INSTANCE);
         addFunction(SCALAR_MAX, ScalarVersionOfAggregateResultType.INSTANCE);
@@ -720,7 +722,7 @@
         addFunction(SCALAR_SUM, ScalarVersionOfAggregateResultType.INSTANCE);
         addPrivateFunction(SCAN_COLLECTION, NonTaggedCollectionMemberResultType.INSTANCE);
         addPrivateFunction(SERIAL_AVG, OptionalADoubleTypeComputer.INSTANCE);
-        addPrivateFunction(SERIAL_COUNT, AInt32TypeComputer.INSTANCE);
+        addPrivateFunction(SERIAL_COUNT, AInt64TypeComputer.INSTANCE);
         addPrivateFunction(SERIAL_GLOBAL_AVG, OptionalADoubleTypeComputer.INSTANCE);
         addPrivateFunction(SERIAL_LOCAL_AVG, NonTaggedLocalAvgTypeComputer.INSTANCE);
         addPrivateFunction(SERIAL_SUM, NonTaggedSumTypeComputer.INSTANCE);
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java
index b232d6d..cfa6a8a 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableCountAggregateDescriptor.java
@@ -4,8 +4,8 @@
 import java.io.IOException;
 
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import edu.uci.ics.asterix.om.base.AInt32;
-import edu.uci.ics.asterix.om.base.AMutableInt32;
+import edu.uci.ics.asterix.om.base.AInt64;
+import edu.uci.ics.asterix.om.base.AMutableInt64;
 import edu.uci.ics.asterix.om.base.ANull;
 import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
 import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
@@ -51,10 +51,10 @@
             public ICopySerializableAggregateFunction createAggregateFunction() throws AlgebricksException {
 
                 return new ICopySerializableAggregateFunction() {
-                    private AMutableInt32 result = new AMutableInt32(-1);
+                    private AMutableInt64 result = new AMutableInt64(-1);
                     @SuppressWarnings("unchecked")
-                    private ISerializerDeserializer<AInt32> int32Serde = AqlSerializerDeserializerProvider.INSTANCE
-                            .getSerializerDeserializer(BuiltinType.AINT32);
+                    private ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
+                            .getSerializerDeserializer(BuiltinType.AINT64);
                     @SuppressWarnings("unchecked")
                     private ISerializerDeserializer<ANull> nullSerde = AqlSerializerDeserializerProvider.INSTANCE
                             .getSerializerDeserializer(BuiltinType.ANULL);
@@ -65,7 +65,7 @@
                     public void init(DataOutput state) throws AlgebricksException {
                         try {
                             state.writeBoolean(false);
-                            state.writeInt(0);
+                            state.writeLong(0);
                         } catch (IOException e) {
                             throw new AlgebricksException(e);
                         }
@@ -75,7 +75,7 @@
                     public void step(IFrameTupleReference tuple, byte[] state, int start, int len)
                             throws AlgebricksException {
                         boolean metNull = BufferSerDeUtil.getBoolean(state, start);
-                        int cnt = BufferSerDeUtil.getInt(state, start + 1);
+                        long cnt = BufferSerDeUtil.getLong(state, start + 1);
                         inputVal.reset();
                         eval.evaluate(tuple);
                         ATypeTag typeTag = EnumDeserializer.ATYPETAGDESERIALIZER
@@ -86,19 +86,19 @@
                             cnt++;
                         }
                         BufferSerDeUtil.writeBoolean(metNull, state, start);
-                        BufferSerDeUtil.writeInt(cnt, state, start + 1);
+                        BufferSerDeUtil.writeLong(cnt, state, start + 1);
                     }
 
                     @Override
                     public void finish(byte[] state, int start, int len, DataOutput out) throws AlgebricksException {
                         boolean metNull = BufferSerDeUtil.getBoolean(state, start);
-                        int cnt = BufferSerDeUtil.getInt(state, start + 1);
+                        long cnt = BufferSerDeUtil.getLong(state, start + 1);
                         try {
                             if (metNull) {
                                 nullSerde.serialize(ANull.NULL, out);
                             } else {
                                 result.setValue(cnt);
-                                int32Serde.serialize(result, out);
+                                int64Serde.serialize(result, out);
                             }
                         } catch (IOException e) {
                             throw new AlgebricksException(e);
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/CountAggregateFunction.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/CountAggregateFunction.java
index 82c1e8a..a553402 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/CountAggregateFunction.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/CountAggregateFunction.java
@@ -4,8 +4,8 @@
 import java.io.IOException;
 
 import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
-import edu.uci.ics.asterix.om.base.AInt32;
-import edu.uci.ics.asterix.om.base.AMutableInt32;
+import edu.uci.ics.asterix.om.base.AInt64;
+import edu.uci.ics.asterix.om.base.AMutableInt64;
 import edu.uci.ics.asterix.om.types.ATypeTag;
 import edu.uci.ics.asterix.om.types.BuiltinType;
 import edu.uci.ics.asterix.om.types.EnumDeserializer;
@@ -22,13 +22,13 @@
  * COUNT returns the number of items in the given list. Note that COUNT(NULL) is not allowed.
  */
 public class CountAggregateFunction implements ICopyAggregateFunction {
-    private AMutableInt32 result = new AMutableInt32(-1);
+    private AMutableInt64 result = new AMutableInt64(-1);
     @SuppressWarnings("unchecked")
-    private ISerializerDeserializer<AInt32> int32Serde = AqlSerializerDeserializerProvider.INSTANCE
-            .getSerializerDeserializer(BuiltinType.AINT32);
+    private ISerializerDeserializer<AInt64> int64Serde = AqlSerializerDeserializerProvider.INSTANCE
+            .getSerializerDeserializer(BuiltinType.AINT64);
     private ArrayBackedValueStorage inputVal = new ArrayBackedValueStorage();
     private ICopyEvaluator eval;
-    private int cnt;
+    private long cnt;
     private DataOutput out;
 
     public CountAggregateFunction(ICopyEvaluatorFactory[] args, IDataOutputProvider output) throws AlgebricksException {
@@ -56,7 +56,7 @@
     public void finish() throws AlgebricksException {
         try {
             result.setValue(cnt);
-            int32Serde.serialize(result, out);
+            int64Serde.serialize(result, out);
         } catch (IOException e) {
             throw new AlgebricksException(e);
         }