Castelnau, Conde de, Brazil