Foreign Tax Credit (Form 1116)

If one 1099's shows Foreign Taxes Paid to 4 foreign countries, how do I fill out Form 1116.

 

And if I have two 1099s that paid foreign taxes to the same foreign country, how do I fill out Form 1116?

 

Thanks in advance.