diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml
index 685189bb836f94ec336cd9c584d70bba9a7a5dc9..b9eeba486d060c260c260cd68e93386b11fc889a 100644
--- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml
+++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_innodb/z_count_results.xml
@@ -144,6 +144,9 @@ selection_report</string> </value>
 
 SELECT\n
   COUNT(DISTINCT catalog.uid) <dtml-comment>We need subselect for better statistics</dtml-comment>\n
+<dtml-if select_expression>\n
+  , <dtml-var select_expression>\n
+</dtml-if>\n
 FROM\n
   <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
   <dtml-if selection_domain>\n
@@ -219,6 +222,9 @@ GROUP BY\n
 
 SELECT\n
   COUNT(DISTINCT catalog.uid) <dtml-comment>We need subselect for better statistics</dtml-comment>\n
+<dtml-if select_expression>\n
+  , <dtml-var select_expression>\n
+</dtml-if>\n
 FROM\n
   <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
   <dtml-if selection_domain>\n
diff --git a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
index 3cacc0b93c9c9c03a72da624ca28a09ba5c1336f..ca7bf83ac53a27a2a914bed25e1a07478dd8ef47 100644
--- a/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
+++ b/product/ERP5/bootstrap/erp5_mysql_innodb_catalog/bt/revision
@@ -1 +1 @@
-12
\ No newline at end of file
+13
\ No newline at end of file
diff --git a/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml b/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml
index 2459163021f57af914ea6143855d3edf4c43fc21..a7bedf5e1e8767461fbed83f257644bc61388ed2 100644
--- a/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml
+++ b/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/CatalogMethodTemplateItem/portal_catalog/erp5_mysql_ndb/z_count_results.xml
@@ -136,6 +136,9 @@ selection_report</string> </value>
 
 SELECT\n
   COUNT(DISTINCT catalog.uid) <dtml-comment>We need subselect for better statistics</dtml-comment>\n
+<dtml-if select_expression>\n
+  , <dtml-var select_expression>\n
+</dtml-if>\n
 FROM\n
   <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
   <dtml-if selection_domain>\n
@@ -207,6 +210,9 @@ ORDER BY\n
 
 SELECT\n
   COUNT(DISTINCT catalog.uid) <dtml-comment>We need subselect for better statistics</dtml-comment>\n
+<dtml-if select_expression>\n
+  , <dtml-var select_expression>\n
+</dtml-if>\n
 FROM\n
   <dtml-in from_table_list> <dtml-var sequence-item> AS <dtml-var sequence-key><dtml-if sequence-end><dtml-else>,</dtml-if></dtml-in>\n
   <dtml-if selection_domain>\n
diff --git a/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/bt/revision b/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/bt/revision
index 978b4e8e518d1242cbf102a1bebdb52e41705102..a5c750feac4168f62cfd29aa62b4624f0a430cd5 100644
--- a/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/bt/revision
+++ b/product/ERP5/bootstrap/erp5_mysql_ndb_catalog/bt/revision
@@ -1 +1 @@
-26
\ No newline at end of file
+27
\ No newline at end of file