В предложении 5 грамматических основ:
Схема: [ когда \( \underline{\hspace{0.5cm}} \underline{\hspace{0.5cm}} \) ], [ \( \underline{\hspace{0.5cm}} \underline{\hspace{0.5cm}} \) ], [ \( \underline{\hspace{0.5cm}} \underline{\hspace{0.5cm}} \) ], а [ \( \underline{\hspace{0.5cm}} \underline{\hspace{0.5cm}} \) и \( \underline{\hspace{0.5cm}} \underline{\hspace{0.5cm}} \) ].
Ответ: б) 5