I think it is 7.
As Synthesized attribute is used by parent node which takes value from its child. In given semantic rules if you see everytime when right hand side of production is reduced to nonterminal there is some semantic action which has ti performed at everynode. Each parent is using value from its child.
Plz Correct me if i am wrong.