Um, can’t you set a Group By on facilities requirements and then see all the counts?
If you had a way to tabulate the counts in a Script Block, what then? Post them to a new summation table? If this is you plan, I believe you can create a roll-up to achieve the same outcome and all without script.