Enable specification of number of nonzero symbols

Hi @mortenvp, let me know what you think. Everything seems to be working on the build slaves..