Although not specified directly, i'd first would make the math and then place the result in the write command:

temp1=addres+counterD

write temp1... etc

I2Cwrite and I2Cread commands work only this way.

Ioannis