Now that I’m home I have tried this method for real and it works really well.
Made a slight adjustment to the code to get the count as separate outputs.
Single or double click:
[{"id":"369f09d5301f8e12","type":"function","z":"a787a77.9c16458","name":"Count clicks","func":"var count = context.get(\"count\") || 0;\n\nif(msg.count === count && count !== 0){\n context.set(\"count\",0);\n if(msg.count == 1){\n return [null,msg];\n }else if(msg.count == 2){\n return [null,null,msg];\n }\n}\n\nif(count < 3){\n if(msg.delay === undefined){\n count++\n context.set(\"count\",count);\n }\n msg.delay = true;\n msg.count = count;\n return [msg,null];\n}\n\n","outputs":3,"noerr":0,"initialize":"","finalize":"","libs":[],"x":390,"y":980,"wires":[["ae82c7370bb69a8d"],["e3cccd4158d914d9"],["d2fcd6e1a6abc0ec"]]},{"id":"ae82c7370bb69a8d","type":"delay","z":"a787a77.9c16458","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":390,"y":920,"wires":[["369f09d5301f8e12"]]}]
Single, double and triple click:
[{"id":"f71f676548319823","type":"function","z":"a787a77.9c16458","name":"Count clicks","func":"var count = context.get(\"count\") || 0;\n\nif(msg.count === count && count !== 0){\n context.set(\"count\",0);\n if(msg.count == 1){\n return [null,msg];\n }else if(msg.count == 2){\n return [null,null,msg];\n }else{\n return [null,null,null,msg];\n }\n}\n\nif(count < 3){\n if(msg.delay === undefined){\n count++\n context.set(\"count\",count);\n }\n msg.delay = true;\n msg.count = count;\n return [msg,null];\n}\n\n","outputs":4,"noerr":0,"initialize":"","finalize":"","libs":[],"x":830,"y":1820,"wires":[["5d15cc8ae8b271fd"],["26968a0272f131d6","9d887b9008446eb7"],["ebf74253e126824f","9d3b8e0ad4bcd6c2"],["f297e66f233737d1","56d9e798c123ed30"]]},{"id":"5d15cc8ae8b271fd","type":"delay","z":"a787a77.9c16458","name":"","pauseType":"delay","timeout":"800","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"allowrate":false,"outputs":1,"x":830,"y":1720,"wires":[["f71f676548319823"]]}]