Hola Lori,
Thanks for checking in regarding Costa Rica residency. This is Kathleen, the IL CR correspondent. That is very exciting you will be visiting soon and doing some research!
And the good news is yes! You can be a resident of a foreign country (not just Costa Rica) and receive your Social Security. As long as you keep your citizenship. However, make note that Medicare will not cover you outside the US.
Let me know if I can be of further assistance. My email is CostaRica@InternationalLiving.com.
All the best in your research and pura vida,
Kathleen