This is an oddity in how the client handles mouse click events for quickslots. Note that if you right click you will get the result you want, it only affects the left click (at least for me). You are changing the quickslot alias in the handler that fires for a click which messes up the underlying pointers for the alias in the client causing it to evaluate to nothing (until the click after it is assigned to "Engage!" since it isn't really changing after that). Note that if you count your left clicks, the text is changed to "Engage!" on the click before "Engage!" actually shows up.
You can fairly easily get around this by changing the text asynchronously using an Update event handler:
if Count>0 then
Countqs.Update = function()
The mouse click event now just enables the Update handler which fires asynchronously on the next frame render. It's important to turn off updates inside the Update event handler so that you don't waste machine cycles on every update. This enables the client to update the quickslot after it is completely done firing it's internal events for the quickslot so Lua doesn't stomp on the alias as it's being used.
Note, you probably could have changed to using the MouseUp handler since it is probably fired after the internal event is handled but since MouseUp can be fired for situations that are not clicks, it is not a good solution so I didn't even bother testing if it would have worked.