I need to be able to get a count (in the frontend) of the number of submissions that have a field with a specific value. I don't need the submitted data of the submissions, just the count of submissions whose data matches a specified value.
This code returns the total number of submissions:
{% set submissionCount = craft.freeform.submissions({
form: 'myAmazingForm'
}).count %}
I tried using the native Craft search parameter, but it returns zero:
{% set submissionCount = craft.freeform.submissions({
form: 'myAmazingForm'
}).search('fieldWithValue:123').count %}
And yes, there are submissions that would match that.
How can I do this?