For the 2012 Olympics, 26 sports will be contested. The number and type of sports has differed over the years. Although no new sport will be introduced in London, women's boxing (796.83) was included in the program for the first time as a new discipline with several events. In 2016, golf (796.352) and rugby sevens (796.333) will replace baseball and softball, which were dropped after the Beijing Olympics in 2008. Karate (796.8153), squash (796.343), and roller sports (796.21 Roller skating for comprehensive works only; a specific roller sport classes with the sport, e.g., roller hockey 796.3566) were also in consideration, but ultimately lost their bid.
In previous years, new sports were often introduced into the program as demonstration sports first, but this practice was effectively discontinued after the 1992 Summer Olympics. With the number of contested sports being already rather high, it is unlikely that we will see the routine addition of new sports in the future. This is of course unfortunate for sports that reached recognized status only recently (like dancesport), as their chance of getting on the program in the foreseeable future seems slim. (In case of dancesport, it certainly doesn't help that the IOC seems reluctant to consider a new sport that requires scoring by judges.)
The 1900 Olympics in Paris are somewhat challenging for determining which sports were officially contested. They were held as part of the World's Exposition 1900, not directly organized by the IOC, which later declared many unusual events like fire fighting, life saving, or pigeon racing that were only ever contested at the 1900 Olympic Games as “unofficial.”
There may have been various reasons why a sport disappeared from the program. For example, Tennis, as a sport that proved to be profitable relatively early, left the program in 1924 over IOC's requirements that only amateurs were allowed to compete. Nowadays, it is very rare that sports are removed from the program. Baseball was the first sport to be voted out since polo was eliminated in 1936.
The following sports were once “officially” part of the Olympics. The years that they were Olympic sports are given after each sport.
Baseball (796.357) – 1992-2008 (however, there is a long history of baseball as a demonstration sport, as which it took part in seven Olympics starting in 1912)
Cricket (796.358) – 1900
Croquet (796.354) – 1900
Golf (796.352) – 1900-1904 (returning for 2016)
Polo (796.353) – 1900, 1920-1924, 1936
Rugby union (796.333) – 1900, 1908, 1920-1924 (returning as rugby sevens in 2016)
Softball (796.3578) – 1996-2008
Tug-of-War (796.2) – 1900-1920
While the other sports have their own number and are mentioned in the index, tug-of-war does not have its own number and is not mentioned in the index. Thus, one must investigate each of the numbers in 796 Athletic and outdoor sports and games. At 796.2 Activities and games requiring equipment is the note “Not provided for elsewhere.” Even though tug-of-war is not mentioned in the including note at 796.2, it is classed at 796.2 because it requires equipment, i.e., a rope, and is not provided for elsewhere.