Return the number of issues under the epic.
Create and configure a Smart field using this expression in Jira expression mode:
issue.stories?.length
Smart number field
Jira expression