In any case, here is the window I am looking to measure for a screen, first, with the screen installed. Note that my screen covers only the bottom half of the window. There are pros and cons to having half-size screens, but since that is what we inherited, that is what we decided to replicate.
And now, a shot of the same window, without a screen or storm. Look at the beautifully shiny, wavy glass!
This time, take an average of the two vertical measurements, and use that as the final measurement for the height of the screen. You don't want it to be too high or too low, so an average is probably best.
Measurement number five is the depth of the frame for the screen.
If you have existing wooden storms or screens, measure the depth of the lumber used for the frame and just use that size. Otherwise, you need to figure out what your screen will rest against (usually against what is called the "blind stop"--that is, the little strip of wood inside the casing that keeps the outer window from falling out onto the porch).
In the photos above, the ugly black weatherstripping is stuck to the outside of the stops on all four sides of the window. My storms snug up against the weatherstripping. But every window seems to be made a bit differently. Not a surprise -- we're talking pre- or early-industrial age here. None of the manuals I've consulted show windows that are made quite like mine, so I assume yours too might be slightly different. But every double hung window has a "blind stop" that holds the sash in place, so it can run up and down inside the frame without falling out. The outside of the stop is most likely what the storm or screen would be placed up against.
You need to measure the depth of your trim or casing from the outer edge of the blind stop to the outer edge of the trim or casing, so that the screen, when it is put in place, will be flush with the casing. I'll take a couple photos of the storm that's in place now, to illustrate. I can't take a photo of the screen in place--it's winter ...
Bottom line is, as you can see, the face of the storm is flush with the face of the casing. You want the screen to be the right depth to end up flush, as this storm is.