Last time I checked, Bedrock edition looked like it was using the old command syntax (from Java 1.12) so I will try to convert all the commands to the old syntax. Here are some I've managed to convert:
/scoreboard objectives add count dummy
/execute @a[tag=inGame] ~ ~ ~ scoreboard players add counter count 1
/execute if score counter count matches 1 run ... <-- this one I'm not sure how to convert
/scoreboard players reset counter count
the only commands which needed re-writing were the seconds and the third command. Also, I'm not sure what the 1.12 equivalent of the third command is.