Numerical answer type.
Answer: 3
At each stereocentre OH is first and H is last; the carbon group nearer the CHO end outranks the one nearer CHX2OH, because exploring towards the aldehyde end reaches a carbon with more oxygen first (at C2, CHO (O,O,H) beats C3 (O,C,H); at C5, C4 (O,C,H) beats CHX2OH (O,H,H); at C3 and C4 the tie is broken one sphere further out in the same direction). Applying the sequence rule to the drawing gives C2 (R), C3 (S), C4 (R) and C5 (R). D-glucose is (2R,3S,4R,5R), so 3 stereocentres are (R).