Synchronized the run code.

The code needs to be synchronized in two places. Both the counter class
that has the increment/decrement methods and the code that calls those
methods.