writer: add a way to track the current amount of transmitted data

This makes the transaction counter available to the wishbone
interface.