in reply to Counting lines as I write them...

fglock's method seems like one of the better ways, but here's an alternative if a filter is more desirable (good one-liner example if nothing else):
perl -ne '++$cts{$1} && print if /^(\*{3}M|\!{3}|\@{3})/; END { while( +my($k,$v)=each %cts){printf STDERR "Total errors for %s: %d\n", $k, $ +v;} }'
can use it with anything along the lines of (note bash syntax for redirects):
$ONELINER somelog.txt >> dataload.errs 2> cts.txt cat somelog.txt | $ONELINER >> dataload.errs
where "$ONELINER" represents the perl script pasted in, or an alias, or a 1 line script file w/the perl.