Simple example how Singleton scope works. Its not threadsafe but it shows the basic functionally which must be understood( that the instance of the counter is single for the scope of the application).