An upper limit is $16$: the number of balls in each bag is between $0$ and $15$, so if we have more than $16$ bags, two are forced to have the same number of balls.
We can achieve $16$ as follows:
1. Leave bag #0 empty.
2. Put bag #0 and a ball inside bag #1.
3. Put bag #1 and a ball inside bag #2.
4. Put bag #2 and a ball inside bag #3.
5. And so on.
Then bag #$k$ contains $k$ balls total: the $k-1$ balls inside the previous bag, and one more.