For below payload I should get output as 3 in variable ,As first occurrence of <D_735>P</D_735> having two values in D_628 (2000086731 10)

For below payload I should get output as 3 in variable ,
As first occurrence of <D_735>P</D_735> having three values in D_628 (2000086731 10 20)

Please find attached payload.
Thanks in advance.