Emma is baking cookies for a bake sale. She prepares 48 cookies and decides to package them in boxes. Each box can hold 6 cookies. After packing the cookies, she realizes that she has 8 cookies left over. How many boxes did Emma fill with cookies?