total cans on bottom 4 shelves = 29 x 4 = 116
total cans on top 3 shelves = 42 x 3 = 126
total cans = 116 + 126 = 242 cans
-------------------------------------------------------------
used cans = 56
remaining cans = 242 - 56 = 186 cans
number of cans in each shelf = 9
number of shelves = 186/9 = 20 and 6 cans remaining
remaining 6 cans will be displayed in another shelf
total shelves = 20+1 = 21