@Override
  public long numCqsOnRegion(String regionName) {
    DefaultQueryService queryService =
        (DefaultQueryService) cqService.getInternalCache().getLocalQueryService();
    try {
      CqQuery[] cqs = queryService.getCqs(regionName);

      if (cqs != null) {
        return cqs.length;
      }
    } catch (Exception ex) {
      // Dont do anything.
    }
    return 0;
  }
Returns the number of CQs (active + suspended) on the given region.
geode-cq/src/main/java/org/apache/geode/cache/query/cq/internal/CqServiceStatisticsImpl.java