Dynamic picklist

Dynamic picklist

Hi guys,
I want to add a criteria that remove Staff that have more than 10 Service record from Staff lookup picklist field in FormA. At the moment I have script that filter Staff for Services offered. Is possible to add also this criteria? I try with IF and FOR EACH without success.
Thanks for any help.

Mike
  1. stafflist = (FormB[(Service == input.Service && Status == "Active")].ID).getall();
    Staff:ui.add(stafflist);