@Override
protected Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed) {
if (whereItems.isEmpty()) {
final String session = _sessionId.get();
final String moduleName = table.getName();
final GetEntriesCountResult entriesCount = _service.getEntriesCount(session, moduleName, "", 0);
final int resultCount = entriesCount.getResultCount();
return resultCount;
}
return super.executeCountQuery(table, whereItems, functionApproximationAllowed);
}