Dimensions of spaces of generalized spherical functions