In the following at first I didn’t understand how the DMA was being used as a counter, as we first categorize DMA as moving data from one place to another. But there is a counter in there, to increment each time it writes a byte to keep track during multiple byte transfers. It is possible to use just the counter part and not do the data transfers.
When we think as teams, its these different parts of a same thing that are viewed and held by different people as their puzzle piece and then it all comes together. Each by itself is a simple concept. But holding the two for a person at a time, might not be usual. This is the assembling of disparate ideas to view each of it for the right fit.