Use Optimizable::dimension() for accessing the overall number of parameters.