code: private static int getBucketCount(SimpleOrderedMap<Object> solrFacets, int defaultCount) {
          List<SimpleOrderedMap<Object>> solrBuckets = (List<SimpleOrderedMap<Object>>) solrFacets.get("buckets");
          if (solrBuckets == null) {
              for (int i = 0; i < solrFacets.size(); i++) {
                  if (solrFacets.getName(i).equals("count")) {
                      return (int) solrFacets.getVal(i);
                  }
              }
          }
          return defaultCount;
      }
docs: In order to process type=query facets with a nested type=range.
  
  @param solrFacets    Solr facet
  @param defaultCount  Default count
  @return  Actual count