A few years ago we were in South Africa to visit several national parks. We used an affluent suburb of Johannesburg as our "base" because the parks we visited were in various parts of the country. In this suburb (called Sandton..it's written up on Wikipedia) everywhere you look there are fences with barbed wire,huge walls and gates...and security guards.
Every building you see...private home or business establishment (that suburb is the corporate headquarters of one of the country's biggest banks) have signs at the front saying something like "Protected By XYZ Security,Armed Response".
I wonder if your friend would be able to answer your question...
I wouldn’t call Costa Rica dangerous, but every home, except the very poorest, has walls, razor wire etc. around it. They build homes and buildings with the idea that someone is going to try and break in. Ticos tend to blame Nicaraguans for crime or homelessness.