Where the shared file are from? Which type of files? These shared files were sent as attachments in the email previously,now do you want to send them in the form of email with file links? Could you please provide some screen shots to further explanation?
In addition, what you want to get is how many emails with shared file attachments in mailbox? You can first create a rule in the mailbox and put this type of mails into the same folder. Then input the text "hasattachments:yes" in search box, the number of eligible emails (Items:XXX) will be displayed in the lower left corner of the page.
If the above information is not what you want, please provide more details to clarify your requirement. Thank you.