Adds classification count information to JSON. No longer selects invalid occurrences.