Also, ret is accumulative, so counts from the first count will be subtracted from every subsequent count.