How to count stores in cache analysis of matrix multiplication
It appears that the analysis assumes that integer variables are stored in registers, whereas array elements have to be loaded from and stored to memory. The point you've missed is that the statemnt X += Y requires reading X and then writing the new value of X.

sum += a[i][k] * b[k][j];


This loads a[i][k], loads b[k][j], multiplies them, reads sum, adds sum and the product and writes the result to sum. Two loads, no stores.

c[i][j] += r * b[k][j];


This loads b[k][j], reads r, multiplies them, loads c[i][j], adds the product to it and stores the new value of c[i][j]. Two loads, one store.

c[i][j] += a[i][k] * r;


This is essentially the same as the previous case.