Hi,
Yes you can export local variable value in your export file.
In your JS, define variable as:
vars.output=vars.recCount
And then file configuring columns of your export file. Add column using edit the expression and give value as:
$(vars/@output)

Thanks.