A local bakery sells cookies and cupcakes. Each cookie costs $2 and each cupcake costs $3. Last Saturday, the bakery sold a total of 100 items and earned $240 from these sales. Let c represent the number of cookies sold and p represent the number of cupcakes sold. You can model this situation with the following system of equations:
$$c + p = 100$$
$$2c + 3p = 240$$
How many cupcakes did the bakery sell last Saturday?