A bakery sells cupcakes and cookies. Each cupcake costs $2, and each cookie costs $1. Maria wants to buy a total of 12 cupcakes and cookies combined. How many cookies will Maria buy?
Let x represent the number of cupcakes and y represent the number of cookies that Maria buys. The problem can be framed as the following equation:
$$ x + y = 12 $$
We need to find the value of y.