That's a good question, I wasn't too sure myself as to the official rules, so I looked for a reliable source and found the information on the Judicial Branch web site:
http://www.poder-judicial.go.cr/salatercera/leyes/leypenal/leyarmas.htm(spanish)
The upshot is that habitants of Costa Rica may have weapons in their home for their protection with out any special type of permission, however the weapon must be registered. This is done at the time of purchase, when the weapon is bought in Costa Rica. Registration is done at Dirección General de Armamento, Departamento de Control de Armas y Explosivos.
Permitted weapons (article 20):
a) Pistols and revolvers - calibre de 5.6 mm. (.22 caliber) to 18.5 mm (.12 caliber), and that are not automatic.
b) Semiautomatic Revolvers and Pistols up to .45 caliber (11.53 mm).
c) Escopetas hasta calibre 12" (18.5 mm).
d) Carbines and rifles up to hasta .460 caliber (11,68 mm).
e) Weapons that make up collections of permitted weapons.
f) Weapons used by sportsmen, hunters, marksmen and skeet shooters mentioned in article 60
The registration of over 3 weapons for self defense must be justified.
The production of weapons is prohibited. Also chemical and biological weapons are prohibited, as are biological weapons.
In general, no one may carry weapons in the street, except police officers. However, special permissions may be authorized if the person can show that their life is in danger, or that in the nature of their occupation it is necessary.
Article 60 permits these weapons
a) Pistols, revolvers and rifles .22 caliber.
b) Pistols and revolvers up to .38 caliber, for competetion.
c) Shotguns up to .12 gauge (18.5 mm).
d) 3 barrel Shotguns up to .12 guage, with barrels of distinct caliber.
e) Hi-powered Rifles, semi-automatic, except .30 caliber carbines, fusiles mosquetones?, and .223 caliber or 7mm or 7.62 mm carbines, and .30 caliber "Garand" rifles.
f) Other weapons with sporting characteristics as defined by national and international norms of hunting and sharpshooting in its different variations.