And what is the answer to number 2?
One thing you need to know is that you are NOT building a web page you are building part of the web page NR is creating. If you want to build a web page and control everything then you should take a look at node-red-contrib-uibuilder.
If using node-red-dashboard, in the ui-template node you don't want , and statements
Your script section has two statements
the function node is sending the same msg out the two outputs and tehy go to the same nodes, so the nodes are getting the same message twice.
You need to do some research on angular, and if you want to use the ui-template node, this video is a good starting point.
Here is a rough example of using ui-text nodes to do what you want
[{"id":"17b225.849d7ddb","type":"tab","label":"MY FLOW","disabled":false,"info":""},{"id":"6fd3a097.203b4","type":"function","z":"17b225.849d7ddb","name":"","func":"\nvar called_number = flow.get(\"called_number\")||1;\nvar sender = msg.topic;\n\n\nif (msg.payload === \"RESET\") {\n // set its value locally\n called_number= 0;\n} else if (msg.payload === \"INCREMENT\") {\n called_number++;\n} else if (msg.payload === \"DECREMENT\") {\n called_number--;\n}\n else if (msg.payload === \"RECALL\") {\n called_number = called_number;\n}\n \n\nflow.set('called_number',called_number);\n\n\nmsg.payload = called_number;\nmsg.topic = sender;\n\n\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":220,"wires":[["49ee934f.00564c","d7cf85d7.f4c4d8","21b1e7d2.1d8818","afd178c3.e98708"]]},{"id":"aafb1f67.edb04","type":"ui_button","z":"17b225.849d7ddb","name":"DECREMENT","group":"7d4ccedf.77128","order":1,"width":"6","height":"2","passthru":true,"label":"BACK","tooltip":"","color":"","bgcolor":"BLUE","icon":"","payload":"DECREMENT","payloadType":"str","topic":"3","topicType":"str","x":140.5,"y":230,"wires":[["6fd3a097.203b4"]]},{"id":"b22edb44.a68ee8","type":"ui_button","z":"17b225.849d7ddb","name":"INCREMENT","group":"7d4ccedf.77128","order":2,"width":"6","height":"2","passthru":true,"label":"NEXT","tooltip":"","color":"","bgcolor":"GREEN","icon":"","payload":"INCREMENT","payloadType":"str","topic":"1","topicType":"str","x":123.5,"y":157,"wires":[["6fd3a097.203b4"]],"info":"** NEXT_ NEXT_**"},{"id":"83578137.813b2","type":"ui_button","z":"17b225.849d7ddb","name":"RECALL","group":"7d4ccedf.77128","order":3,"width":"6","height":"2","passthru":true,"label":"RECALL","tooltip":"","color":"","bgcolor":"ORANGE","icon":"","payload":"RECALL","payloadType":"str","topic":"2","topicType":"str","x":117.5,"y":193,"wires":[["6fd3a097.203b4"]]},{"id":"49ee934f.00564c","type":"ui_template","z":"17b225.849d7ddb","group":"6d065ea9.ec5f4","name":"","order":1,"width":0,"height":0,"format":"\n<style>\n* {\n box-sizing: border-box;\n}\n#MYTAB_info_cards {\n display: grid;\n grid-template-columns: auto auto auto ;\n grid-gap: 10px;\n background-color:gray; /*#2196F3;*/\n padding: 10px;\n}\n.nr-dashboard-text {\n background-color: rgba(255, 255, 255, 0.8);\n text-align: center;\n padding: 20px 0;\n font-size: 60px;\n}\n\n</style>\n\n<h1 id =\" welcome\">MY HOME PAGE</h1>\n\n\n\n","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":700,"y":100,"wires":[[]]},{"id":"d7cf85d7.f4c4d8","type":"debug","z":"17b225.849d7ddb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":530,"y":320,"wires":[]},{"id":"21b1e7d2.1d8818","type":"ui_text","z":"17b225.849d7ddb","group":"6d065ea9.ec5f4","order":3,"width":"2","height":"2","name":"counter","label":"","format":"{{msg.payload}}","layout":"col-center","x":880,"y":180,"wires":[]},{"id":"53e8f11.d646d9","type":"ui_text","z":"17b225.849d7ddb","group":"6d065ea9.ec5f4","order":2,"width":"2","height":"2","name":"caller","label":"","format":"{{msg.payload}}","layout":"col-center","x":750,"y":160,"wires":[]},{"id":"afd178c3.e98708","type":"change","z":"17b225.849d7ddb","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"topic","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":720,"y":240,"wires":[["53e8f11.d646d9"]]},{"id":"7d4ccedf.77128","type":"ui_group","name":"Caller","tab":"1c81a733.812339","order":1,"disp":true,"width":"6","collapse":false},{"id":"6d065ea9.ec5f4","type":"ui_group","name":"Default","tab":"98d52966.1afc88","order":1,"disp":true,"width":"6","collapse":false},{"id":"1c81a733.812339","type":"ui_tab","name":"BUTTONS","icon":"dashboard","disabled":false,"hidden":false},{"id":"98d52966.1afc88","type":"ui_tab","name":"MYTAB","icon":"dashboard","disabled":false,"hidden":false}]