Personally, I would write a filter script in my language of my choice that would read mail from stdin, parse out the sender address, count the number of characters in the message body and accumulate that information to a database table to be queried later.
But how to do that has nothing to do with postfix is completely beyond the scope of this form.