The number of homes listed for sale at the end of 2012 stood at the lowest level in more than five years, a development that helps explain why home prices have rebounded so strongly over the past year.