Now that you have a frame whose counts are due only to photoelectrons. We need to make sure we're removing any unwanted signal from the atmosphere. Subtract the background estimated from the neighborhood of the source.
Radial Fitting
Identify a sub-frame of defined side length centered on your source
Center annuli of varying radius on the source.
Calculate the average counts in each annulus
Fit a 1-D PSF to the resulting average counts vs. radial distance from source center
Be sure the model function has a constant term
If you trust the fit, take the constant term and subtract it from each pixel in the sub-frame
Sum all remaining counts some radius from the source center – go out to where the PSF fit indicated the background dominates
The result is the total number of counts received from your source after the radiant energy traversed the atmosphere to your detector