Remove unused code.

`counter` appears to be unused.