Why did the South-American Portuguese colonies unite into one country, Brazil, whereas the South-American Spanish colonies split into many different countries, i.e. Argentina, Peru, Chile, etc?
Historically, there weren't multiple Portuguese colonies in South America. There was just one. The Portuguese governed Brazil as a single unit since 1549, when the failed Captaincies were merged. This became the Viceroyalty of Brazil (1775), the Kingdom of Brazil (1815, still ruled by the Portuguese Crown), the independent Empire of Brazil (1822, when Pedro I rebelled against his father, the King of Portugal), and finally the current republic (1889).
In contrast, the Spanish colonies were governed as multiple independent areas.