In a microflow, after the retrieve activity, use an aggregate list ‘count’ activity. That will give you the count for the external entity.