Grease bottom of 9" x 13" casserole dish with butter or cooking spray.
Melt butter in skillet over medium heat. Saute onions in butter until very soft, stirring constantly. Add garlic during last two minutes of cooking.
In large bowl combine cooked rice, onion/garlic/butter mixture, sour cream, cottage cheese, chilis, salt and pepper.
Layer half the rice mixture in bottom of casserole dish and top with half of shredded cheese. Repeat with remainder of rice mixture; top with remainder of cheese. (If making ahead of time, cover with plastic wrap after everything is assembled and refrigerate up to a day. Remember to let your dish come to room temperature before you place it in the oven.).
Bake for 30 - 40 minutes or until cheese is bubbly.