Confederation (July 1, 1867) united three British North American colonies:
The British North America Act, 1867 (now Constitution Act, 1867) created the Dominion of Canada. Prince Edward Island (1873), British Columbia (1871), and others joined later.
Common confusion: the Province of Canada's two halves (Canada West/East) are sometimes counted separately—but they were a single colony at union.