Morphogenesis doesn't work in either of the ways that you propose.
To understand better, let's shift the focus from teeth to something that's easier for me to explain and visualize: extra fingers, also known as polydactyly. This is a surprisingly common condition, appearing in approximately 1 of every 500 births, and for many people the extra digits are fully functional. More importantly, the causes, even when genetic, are subtle and typically involve very tiny changes in DNA code.
In the embryo, the hand starts out as an undifferentiated blob of tissue. At a certain point in development, it starts patterning and splits into fingers. When the patterning goes wrong, the split happens too often (polydactyly) or not enough (syncdactyly). Once those splits into "stuff that will become fingers" has occurred, however, then the "make a finger" system encoded in the DNA starts running in each and does its best to make a finger, leading to the final outcome.
Thus, the genetic code doesn't need multiple copies of the "make a finger" system or multiple independent invocations of the "make a finger" system: it just needs a system for making a pattern. The specifics for teeth (and any repeated structure) will be different, but the general principle will typically hold (with some caveats; evo-devo is complicated)
If you're a computer person, you can think of it as (very) loosely analogous to calling "split" on a string, then using "map" to apply a function to each of the components that comes out.