Use case
Return the number of sub-tasks in the Done or Complete statuses.
Expression
Create and configure a Smart field using this expression in General parsing mode:
%{count(filterByStatus(subtasks(), "Done, Completed"))}
Please, note that by changing "Done, Completed" into other statuses and resolutions you can adapt this use case for your needs.