Count the Number of Emails in an Account and store in a field.

Count the Number of Emails in an Account and store in a field.

Hello. I have a function that updates the account record with the number of calls, tasks, notes and activities. Emails are also a activity but are not tracked as a getrelated records or I just dont know how to do this. Does anyone know how to get the number of emails sent or received and store them in a field in CRM? I know there is a Email Analytics Report but there is no way to get any of this information into CRM as far as I can tell.

Thanks!