Sorry about the formatting, here is a version that should work based on the Discord guidelines.
[{"id":"b68d2bbddc2bf805","type":"rbe","z":"0f2ee729476aa90a","name":"","func":"rbe","gap":"","start":"","inout":"out","septopics":true,"property":"payload","topi":"topic","x":1850,"y":860,"wires":[["29095af57cab2664","4b11dfde59ac9c7d","bd0ccd2cda026804"]]},{"id":"bd0ccd2cda026804","type":"function","z":"0f2ee729476aa90a","name":"Counter","func":"var counter = context.get('counter') || 0;\n\nif(msg.reset){\n counter = 0;\n node.status({\n fill:'gray',\n shape:'dot',\n text: counter\n }\n );\n\n delete msg.reset;\n\n}else{\n counter++;\n node.status({\n fill:'blue',\n shape:'dot',\n text: counter\n }\n );\n}\ncontext.set(\"counter\",counter);\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\ncontext.set(\"counter\", 0);\nnode.status({\n fill: 'gray',\n shape: 'dot',\n text: 0\n}\n);","finalize":"","libs":[],"x":2035,"y":780,"wires":[[]],"outputLabels":["Off"],"icon":"node-red-dashboard/ui_numeric.png","l":false},{"id":"4b11dfde59ac9c7d","type":"switch","z":"0f2ee729476aa90a","name":"Validation Check2","property":"status","propertyType":"msg","rules":[{"t":"eq","v":"OK","vt":"str"},{"t":"eq","v":"DUPLICATE","vt":"str"},{"t":"eq","v":"QC FAILED","vt":"str"},{"t":"eq","v":"RETRYING","vt":"str"},{"t":"eq","v":"NOREAD","vt":"str"}],"checkall":"false","repair":false,"outputs":5,"x":2030,"y":1060,"wires":[["be7947ecf2ba01f6","be7947ecf2ba01f6","be7947ecf2ba01f6","be7947ecf2ba01f6","6da85ff772e08cfa","6da85ff772e08cfa","be7947ecf2ba01f6","be7947ecf2ba01f6","6da85ff772e08cfa","6e5a6f95502c1142","5818b8a9ec28b7a7"],["472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","77f41c4075cb82eb"],["472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","472c79a37374c11f","e5e9d68a0a3e413c"],["c3ad158299c664e5","c3ad158299c664e5","c3ad158299c664e5"],["472c79a37374c11f"]]},{"id":"6da85ff772e08cfa","type":"switch","z":"0f2ee729476aa90a","name":"IsGateBlocked","property":"blocked","propertyType":"msg","rules":[{"t":"eq","v":"0","vt":"num"}],"checkall":"false","repair":false,"outputs":1,"x":2140,"y":900,"wires":[["93b173faae9a2cea","bcd5b7bc0ff2a4ef"]]},{"id":"bcd5b7bc0ff2a4ef","type":"function","z":"0f2ee729476aa90a","name":"Counter","func":"var counter = context.get('counter') || 0;\n\nif(msg.reset){\n counter = 0;\n node.status({\n fill:'gray',\n shape:'dot',\n text: counter\n }\n );\n\n delete msg.reset;\n\n}else{\n counter++;\n node.status({\n fill:'blue',\n shape:'dot',\n text: counter\n }\n );\n}\ncontext.set(\"counter\",counter);\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\ncontext.set(\"counter\", 0);\nnode.status({\n fill: 'gray',\n shape: 'dot',\n text: 0\n}\n);","finalize":"","libs":[],"x":2285,"y":780,"wires":[[]],"outputLabels":["Off"],"icon":"node-red-dashboard/ui_numeric.png","l":false},{"id":"6e5a6f95502c1142","type":"function","z":"0f2ee729476aa90a","name":"Counter","func":"var counter = context.get('counter') || 0;\n\nif(msg.reset){\n counter = 0;\n node.status({\n fill:'gray',\n shape:'dot',\n text: counter\n }\n );\n\n delete msg.reset;\n\n}else{\n counter++;\n node.status({\n fill:'blue',\n shape:'dot',\n text: counter\n }\n );\n}\ncontext.set(\"counter\",counter);\nreturn msg;\n","outputs":1,"noerr":0,"initialize":"// Code added here will be run once\n// whenever the node is started.\ncontext.set(\"counter\", 0);\nnode.status({\n fill: 'gray',\n shape: 'dot',\n text: 0\n}\n);","finalize":"","libs":[],"x":2195,"y":960,"wires":[[]],"outputLabels":["Off"],"icon":"node-red-dashboard/ui_numeric.png","l":false}]