Refactor CountByField.
Clean up normalize_document_counts syntax.