WIP: Capture per-feature counts for snapshot

This isn't quite finished. I'm tempted to wait until @domdere has finished with adding a new metadata file and storing the values on save once. Unless we think this is worth doing sooner.
Not sure how plausible it is in this case, but the general mechanism for making these better is to throw an extra type at it. Where you have a new type wrapper for the Map[...] with a custom json codec, and then you just make these compound cases a `casecodec`.