Hi David,
No worries. A lot of folks have this same question.
In Costa Rica only permanent residents and citizens are allowed to possess firearms. To become a permanent resident you have to be a temporary resident for at least three years. Temporary residency categories include pensionado, or retiree, residency, which requires $1000 per month in income per couple from Social Security or pension.
Once you’re a permanent resident you can apply for a permit, which requires you to go through a background check and take a psychological test. Then you can buy a firearm in the country or apply to import your own from home.