Response.Write("<script>var a=confirm('You are about to change the shipping status of Order Id:! Are you sure you want to continue?');if(a==true){ "+ result++ +"}; </script>");
Your script will generate following script at server and send to client.
result++
will be evaluated at its encounter on server itself. Your confirm box doesn't serve anything but a prompt. You may like to use a hidden variable or something and increment it through your script.
<script>var a=confirm('You are about to change the shipping status of Order Id:! Are you sure you want to continue?');if(a==true){1}; </script>