Jay,
As you are aware the JSP ( including
servlets) are intialised only once in their lifecycle ( which means only one instance) and this intialisation occurs for the first request ( if its not precompiled) hence form the next request only _jspservice() method is called . If you could see the compiled code its better to understand.
So any variable declared inside the _jspservice is local variables , which are intialised for every request. Hence to declare instance variable , it has to be declared outside _jspservice() method and is done inside <%! tag.
So each time the page is requested , the "same single instance variable " count is used.
By the way , in real world applications instance variables are to avoided ( I would say not really needed ) becauses its not
thread safe.