moved serialization out of Counter activity (its in model now)