Use case

Return the number of times that the status of the issue was changed.

Expression

Create and configure a Smart field using this expression in Jira expression mode:

issue.changelogs.filter(changelog => changelog.items.some(item => item.fieldId == 'status')).length