Retirement tax questions

Does the basis calculation consider all the contributions made to all roth IRAs for the year? 

(given that contributions were made to two accounts that year)