The carton had 12 - 5 = <<12-5=7>>7 eggs with one yolk.
It had 5 eggs with double yolks, which added * 2 = <<5*2=10>>10 yolks.
Thus, there were 7 + 10 = <<7+10=17>>17 yolks in the whole carton.
#### 17