Also, a more fair count would associate senders with user-agents ... if I send 100 emails with mutt, and 10 other users send 10 emails each with Outlook, which is more popular? (From a number of users standpoint, Outlook should be the answer). Your script doesn't account for this.
Well then, don't forget to count how many of the Outlook messages were sent by viruses and not actual people.