Clearly, the above technique breaks down as you have more than a few stars in your frame for two reasons: the stars may have overlapping light, and there may be stars in your sky annuli. This leads to techniques for crowded field photometry, a complicated subject which we'll just review quickly.
In crowded field photometry, the idea to that you have to solve for the brightnesses of overlapping stars simultaneously. The way you do this is to use information about the point spread function. Simply, the technique consists of: finding stars, finding the PSF, grouping the stars, and simultaneously fitting for stellar brightnesses and positions. You almost certainly have to do positions because your initial estimates will probably be biased by neighbors. You also might consider fitting for the background as well. We'll consider each one of the steps in order:
Need to consider automation because of completeness issues, not to mention tedium.
Look for peaks. More sublety: look for peaks which look like they have the right shape to be stars. Matched detector algorithm. Shape parameters for spurious object rejection.
Find bright isolated stars. Tabulate the PSF. However, rememeber that you're going to have to use this PSF to estimate brightnesses for other stars, so you'll need to be able to interpolate it accurately. Consider using a functional fit to PSF, possibly carry along residuals as well.
Need to consider all stars that overlap. This can get troublesome, however. Possible solutions: consider central stars only, simultaneously advance all stars.
For all pixels under consideration, compare observed values with first guess values. Use residuals to refine your guesses (nonlinear least squares). Continue iterating until parameters converge.
Sky estimation. Mode approx: 3*median - 2 * mean.
Multiple iterations of entire procedure to improve PSF by subtracting neighbors, also to find new stars under wings of other stars.
Multiple colors/frames simultaneously.
Completeness. Function of crowding. Spurious detections as well as misses.
Averaging measurements. Averaging mags not the same as averaging counts. Beware of weighted means if you use estimated errors, because these can be biased.