docs: private Map<String, Object> buildSQLCount(final int currentPageNum, final int pageSize, final int pageCount,
                                                final Query query, final StringBuilder sqlBuilder, final List<Object> paramList) throws RepositoryException {
          final Map<String, Object> ret = new HashMap<>();
  
          int pageCnt = pageCount;
          int recordCnt = 0;
  
          final StringBuilder selectBuilder = new StringBuilder();
          final StringBuilder whereBuilder = new StringBuilder();
          final StringBuilder orderByBuilder = new StringBuilder();
  
          buildSelect(selectBuilder, query.getProjections());
          buildWhere(whereBuilder, paramList, query.getFilter());
          buildOrderBy(orderByBuilder, query.getSorts());
  
          if (-1 == pageCount) {
              final StringBuilder countBuilder = new StringBuilder("SELECT COUNT(" + JdbcRepositories.getDefaultKeyName() + ") FROM ").append(getName());
              if (StringUtils.isNotBlank(whereBuilder.toString())) {
                  countBuilder.append(" WHERE ").append(whereBuilder);
              }
              recordCnt = (int) count(countBuilder, paramList);
              if (0 == recordCnt) {
                  ret.put(Pagination.PAGINATION_PAGE_COUNT, 0);
                  ret.put(Pagination.PAGINATION_RECORD_COUNT, 0);
  
                  return ret;
              }
  
              pageCnt = (int) Math.ceil((double) recordCnt / (double) pageSize);
          }
  
          ret.put(Pagination.PAGINATION_PAGE_COUNT, pageCnt);
          ret.put(Pagination.PAGINATION_RECORD_COUNT, recordCnt);
  
          final int start = (currentPageNum - 1) * pageSize;
          final int end = start + pageSize;
          sqlBuilder.append(JdbcFactory.getInstance().
                  queryPage(start, end, selectBuilder.toString(), whereBuilder.toString(), orderByBuilder.toString(), getName()));
  
          return ret;
      }