Instead of a variable in the Variables section, you added custom fields to your quest in the Quest/Items section, like this:
To show the value of the custom field "Stars" in your Dialogue Text or in the quest log window or quest tracker HUD, you'll need to use [lua(code)] instead of [var=variable]:
- Dialogue Text: "You have [lua(Quest["Befriend_the_Police"].Stars)] stars."