If you just want to maintain a backyard apiary for fun , hobby, intrigue, study, some honey/wax; there is a minimum number needed to be totally self sufficient and able to over come any problems; 3 main big colonies and 2 nuclei colonies.
If you have many and want to optimize the number in each yard, factors needed to consider are - size of your work crew(s), size of your truck(s), terrain of the area, size of your extracting/processing facility. In other words - much more info is needed!