That has nothing to do with the country. In my hometown in Germany nobody would steal anything, but in S茫o Paolo I saw lots of pickpockets in the tourist destinations I visited.
That's highly depends on exactly _where_ in Brazil you are, time of day, your looks, general luck and many other factors. In may places you are likely to 'forcefully' lose your wallet, cellphone, car and if you are very lucky, that's all you'll lose. You can be encouraged to make a trip to the nearest ATM or even your house. Hopefully you will be alone and there won't be anyone else that can be used as leverage.
Source: have been robbed at gunpoint on several occasions. In one of them, they were discussing whether or not I should be shot. After smashing the driver's side window, while I was at a stop light. Thankfully I only had to clean up a small amount of blood from my car. On another, I was at a police station, was asked to go to a site of a police shooting to try to identify the crooks that had been shot (and were now deceased). Turns out that there was a separate event, not even 15 minutes apart a few blocks away, also two guys on a motorcycle. Those were not the crooks I was looking for, those got... caught.
That was all in a state capital, not in the middle of nowhere. Population equivalent to almost 3 San Franciscos added together.
You should be thankful of your luck.
I left Australia 馃嚘馃嚭
Guess where this will never happen? Hong Kong where I live now but where people are now afraid to visit because they think it's Syria.
I've been to HK, it's ok to visit, living there though is a different matter entirely, sure I may not get robbed at gunpoint but between China and air pollution I will find somewhere else thanks.
Australia is a really safe place by comparison to nearly anywhere else.