It looks like you could just make a single `$this->statHat->reportCount(1)` call at the end of the `if ($templateName != FALSE)` block. You also may not need to call `$this->statHat->clearAddedStatNames()` anywhere since a new MBC_TransactionalEmail object will get created each time the callback is called.