I am attempting to create an email notification that includes the number of failed tests in an Xray Test Execution Issue. (Xray is a test management plug-in for Jira). Unfortunately Xray-specific information such as Test Run results, whilst available in the Jira Issue UI are not part of any accessible Jira custom field.
I have an Automation Component that is sending a web request to the Xray API which returns the required information. I can then drill into that using a smart value that looks like this:

Is there any way I could I then count the number of 'PASSED's and 'FAILED's?