Use case
Return the number of sub-tasks in the Done and Complete statuses of the "Sub-task" issue type.
Expression
Create and configure a Smart field using this expression in General parsing mode:
%{count(filterByIssueType(filterByStatus(subtasks(), "Done, Completed"), "Sub-task"))}