Add the current count of classes, rename `makeSet`.

Function `makeSet` renamed to more appropriate `singletons`.

Added `classes`, which returns the current number of distinct classes.
It's implemented a bit inefficiently as a 1-element array, but this
allows easy representation for both `IO` and `ST` based tasks.