Corrected entry: There were 13 barrels, one for each dwarf. Bilbo had to hang from the side of a barrel because there wasn't one for him to ride in. But after Bombur's barrel broke, he was able to jump into an empty barrel floating along with all the others.
Phixius
25th Apr 2014
Correction: There are more barrels than there are dwarves, as is visible when Thorin orders them to climb in. The reason why Bilbo doesn't have a barrel at the beginning is that he has to open the trapdoor and after he's done that, all the barrels are, of course gone.