1. A method for transferring data between a host device and a storage medium, comprising: receiving from the host device a command to transfer data between the host device and the storage medium; storing in a first register a value for tracking a number of data units that have been transferred into a buffer but that have not yet been transferred out of the buffer; modifying a value contained in the first register in response to a transfer of a data unit into the buffer; and modifying a value contained in the first register in response to a transfer of a data unit out of the buffer.