At the risk of derailing the thread (although I think the original question has been answered).
The stacking we do in astronomy does two very different things.
When imaging very bright objects, such as planets and the moon, we get a huge number of short exposure images (5,000 5-15ms exposures of Jupiter perhaps) and throw away many, often the great majority) of them, keeping the sharpest (at the extreme breaking the image down into a 'map' of smaller units and using the best frames for each bit of the image). This is 'lucky imaging' taking advantage of the moments when the seeing and blurring/distortion is least. These then go on to stacking which gives a second improvement because the amount of 'signal' increases linearly with the number of frames, but the amount of noise (which is inherently random and as likely to cancel out as add up) increases as the square root.
So a stack of 1000 frames will have 60 times the signal to noise ratio of a single frame, making very tiny detail visible.
With objects like nebulas, the challenge is faintness. To get faint things to register you need long exposures. Even the shortest exposures used this way (a few seconds) are too long to benefit from lucky imaging. Instead the image is 'averaged out'. The degree of blur caused by the seeing (and the optical resolution) can be judged from the 'full width half maximum' value of the imaged stars.
CCD cameras typically have big 'well depths', 16-bit conversion and this means they are well suited to long exposures, so you might be able to take 15-30 minute exposures without 'blowing out' the brightest stars in the image.
CMOS cameras with 16-bit conversion are becoming available but most are now 12-14, so less dynamic range, but they have low read noise which makes them suitable for more, shorter, exposures. I typically use 5 minutes.
(Note 'gain' (or misleadingly 'ISO' on DSLRs is tricky, the best gain to use is often differnt with different sensors, and not just the lowest one like with film – there are different ways to choose the right one for a given camera, but usually consensus on what gives the best results).
While we don't benefit for 'luck imaging' on these targets, we do benefit from the noise reduction of stacking. So a typical CMOS stack might be a few tens and CCD stack may be a dozen images, enough to significantly reduce noise and lift faint signals out of the 'noise floor'.
Incidentally there are two main sources of noise: thermal noise, which you can reduce by cooling the sensor, and read noise, which comes with every image. Simplistically, he big well depth of CCD allows you to take longer exposures to minimise read noise (fewer exposures) while the low read noise of CMOS allows you to use more, shorter exposures. You pays your money, you takes your choice… but cooling improves all longer exposures.
We also use stacked 'darks' of the same exposure length to remove the 'average' background signal (e.g. hot and cold pixels). Bias frames are very short exposures (as short as 0.25ms) and give a value to the read noise. 'Flats' are taken against a neutral background and are used to counter vignetting, dust on the sensor and any other factor that may make the illumination of the sensor uneven.
The final bit of the jigsaw is tracking which aims to make sure that (1) each subframe '('sub'
is on target and without star trailing. For longer exposures, guiding is needed with the aim of keeping the 'pointing error' close to or below the resolution of the imaging train, which can be determined by the optical resolution OR the pixel size of the camera. When the pixels are significantly smaller than the optical resolution they can be 'binned' by combining them in groups of four, which doubles the signal to noise ratio in CMOS cameras. CCDs give an even bigger improvement as binning is done in hardware giving the same read noise per four binned pixels as for one single pixel, on top of halving the thermal noise.
So where do we gain over conventional photography? It seems to be in dynamic range, by stacking which gives us (effectively) access to unlimited dynamic range we can ultimate expose long enough to reveal any faint signal without over exposing the bright areas, by using many short exposures. These faint signals can be extracted using non-linear stretching of the data.
This is much less practical with film, but is possible and the results can be indistinguishable on a target like the Andromeda Galaxy.
Here endeth the lesson…

Neil