Can you have variable number of nodes in a material ?

Is it possible to create graphs in the material editor that has a variable number of nodes ?
I want to have a circle split in multiple pieces based on a parameter rather that hard-wiring a set number of pieces to be split.