Lila is baking cookies. She needs 2 cups of sugar for each batch of cookies. If she has 10 cups of sugar and plans to use half of it for a cake, how many batches of cookies can she make with the remaining sugar? Let's think step by step and output the final answer within \boxed{}.
user