synchronised shared counter