Every retailer’s revenue comes down to two numbers: how much customers spend each visit, and how often they come back.