core: use config count not size for allocating space for options
size
counts both actual options and hint entries within option
sets. count
only counts the actual options. we are only interested in
the actual options here, so we should use count
to allocate only the
memory we actually need. this avoids allocating roughly 1000 pointers'
worth of unused space.
the addition of the assert was requested in the original review on the ML, after which this just never progressed to being actually merged.