When you create a story, after you choose the name and enter a description and selection finish, you will come to a new page. At the bottom, you will see "Editor Options," and a blue link that says "change editor features." You need to go there and change both variable and scripting to Advanced.
After you do that, you can do as I have done in the previous posts: create a variable, create an item, and edit the item's script to change the variable. Then, to display the variable's number, you would use on-page scripting.