http://revach.net/article.php?id=4137

Section: Parshas HaShavua   Category: Quick Vort
Parshas Noach: Why Seven Pairs Of Kosher Animals?
Noach took one pair of each non kosher animal specie in order to keep the specie alive after the Mabul.  He also took seven pairs of each kosher animal so that he could offer them as korbanos after the mabul ended.  Why did he need fourteen of each?

The Maskil L'Dovid answers that when a Nes happens to a person he must thank Hashem for saving him in the past and also daven for the future.  SImilarly, after the Mabul, each person needed two animals of each for a korban.  One for his salvation from the Mabul and one for the future.  Noach, his sons, and their wives, were a total of eight people.  From the fourteen animals one pair was needed to be let free and multiply in the land.  That left 12 animals for eight people. 

Since Cham and his wife were Reshaim, as they disobeyed the command not to have relations on the Teivah, they did not need any Korban because Zevach Resha'im To'eivah.  The six remaining people took two each for a total of twelve.