Lucy went to the grocery store. She bought 10 packs of cookie and 4 packs of cake. How many more packs of cookie did she buy over cake?
Let's say that x is the number of packs of cookies and y is the number of packs of cake. 

We know that:

x + y = 14

x = 10

y = 4

Now we can solve for y:

y = 14 - 10

y = 4