It should be something like
if (${count} = 0 or
(/indefinite-repeat/person[position()=${count}]/choice != 'a'
and /indefinite-repeat/person[position()=${count}]/age >= 50),
${count} + 1,
${count})
We're defining a continuing condition so we need to reverse your ending condition. You want to end when "a" is selected or age < 50 so the negation is to continue as long as "a" is not selected AND age is greater than or equal to 50.
If you want to know more about why the or becomes an and, you can read up on De Morgan's laws!