code: public static ClassicCounter<String> fromString(String s) {
      ClassicCounter<String> result = new ClassicCounter<String>();
      if (!s.startsWith("{") || !s.endsWith("}")) {
        throw new RuntimeException("invalid format: ||"+s+"||");
      }
      s = s.substring(1, s.length()-1);
      String[] lines = s.split(", ");
      for (String line : lines) {
        String[] fields = line.split("=");
        if (fields.length!=2) throw new RuntimeException("Got unsplittable line: \"" + line + '\"');
        result.setCount(fields[0], Double.parseDouble(fields[1]));
      }
      return result;
    }
docs: Converts from the format printed by the toString method back into
  a Counter&lt;String&gt;.  The toString() doesn't escape, so this only
  works providing the keys of the Counter do not have commas or equals signs
  in them.
  
  @param s A String representation of a Counter
  @return The Counter