It may have, we'll never know. IMO, by mentioning the 9mm you gave them something else to think about. Two things you can never have enough of in a self defense situation are time and distance. Making them wonder if they really wanted to continue with their current course of action bought you a second, maybe two.Saying only "I do not carry cash" might have also worked.
Had not considered that you never said you had a weapon, just a 9mm (could've been a tool, bolt, etc.) - absolute genius! Don't know if that was intentional, or just the way it came out, but if it were intentional, you deserve the "Clearest thinking under duress" Award of the year.
Somewhat disappointed that it took all the way to the second page of comments for someone to say, "Better to be tried by twelve than carried by six."