The First Minister of Wales has insisted flood defences protected thousands of homes after Storm Bert battered the country.