This is not something specific by Scripture, nor are there even clear principles there from which to discern such.
And, there are honest differences in biblical interpretation as to exactly what the offices do.
Suffice it to say, a covenant community of believers is called to have faith that God will call and appoint the right number from among them. Men with sufficient doctrine and an exemplary, not perfect, but exemplary life pattern, and, if married, whose wives also meet the qualifications (I Timothy 3).
From a practical standpoint, the more officers a congregation has, the more they can do for it. One end of that being to take some burden off the Pastor especially, and then, likewise, to lessen the burden on the other officers.