Assuming the amount of ingredients given are enough to make one batch, and the chef had enough celery and garlic.
We can see : For one batch to be made, 2 cups of onions and 3 cups of carrots are used.
-> 5 cups combined.
Since a total of 20 cups of the same ingredients were used, we can deduce the number of batches the chef made by dividing it by 5.
-> 20 : 5 = 4 (batches)