code: public int sizeOfIn(String expr, Map<String, Object> map) {
          int result;
          Object val = getValue(map, expr);
          if (val instanceof Map) {
              result = ((Map) val).size();
          } else if (val instanceof Collection) {
              result = ((Collection) val).size();
          } else {
              throw new SlimFixtureException(false, expr + " is not a collection");
          }
          return result;
      }
docs: Determines size of either (Map or Collection) value in the map.
  @param expr expression indicating which (possibly nested) value in the map to determine size of.
  @param map map to find value in.
  @return size of value.
  @throws SlimFixtureException if the value found is not a Map or Collection.