Move serviceCounter outside template function am: 7860da3648
am: 4bc606dd5e

Change-Id: Iea27c52a09b3b3ef8a4d06d31855a0f06ebead60