Reduce implementation to just count values.