bugfix in summing generic counters and addition of dgemm_naive_counteachiter which allows one to observe counts on each iteration