It makes sense to assign strings to your touser variable as $(touser) is a string Nightbot simply replaces with the correct value, so you have to specify it. In your first case, you were assigning the variable $(touser), which was not defined, to touser.
For $(count) it works without the quotation marks because it’s an integer and they don’t need to be stored as strings to work properly.