Yes, stack height includes the entire height of the headset, including the bottom race and cup. Just make sure the crown race (top of fork at base of tube) surface is against the bottom of the frame's tube and not inside (if you let it go inside this will give you a greater measurement that is not true). There's your stack height, you want the number you measure to be equal or a bit longer than 36.5 mm.
Ignore the google images that show a diagram of "stack height" including the entire steerer tube, those are clearly not correct.