Validate consistency of count_by

Not sure what I was thinking with that spec in the first place. I'm sure there are probably other consistency checks I/we can add, but starting with this for now.