class ExactCount {

    public ExactCount count(List<Datum> data) {
        for (Datum d : data) {
            for (int i : d.attributes()) {
                Double curVal = counts.get(i);
                if (curVal == null) {
                    curVal = 0.;
                }
                counts.put(i, curVal + 1);
            }
        }

        return this;
    }

}