What was the Treaty of Westphalia?

What was the Treaty of Westphalia? In what ways did it define the European concept of state sovereignty How many political units did Europe have before 1500?  How many did it have by 1800? How can we explain this radical reduction in the number of states in Europe? Which modern international relations theory reflect this historical episode of inter-state anarchy, similar that of the Italian state system of the Renaissance or the classic Greek city states of the Hellenic era?