Workflow filter counts

Story: https://reciprocitylabs.atlassian.net/browse/CORE-57
Please add a text comment to explain what this function does and what significance the count parameter has.