A bakery sells cupcakes at different prices based on their flavor. The prices of chocolate, vanilla, and red velvet cupcakes are represented by the rational numbers $3.50$, $4.00$, and $2.75$, respectively.
On a particularly busy day, a customer bought a total of $12$ cupcakes, consisting of chocolate and vanilla only. The total cost of these cupcakes was $40.00$. If the number of chocolate cupcakes purchased is represented by $x$, how many vanilla cupcakes were purchased?
Let $y$ represent the number of vanilla cupcakes sold. Using the equations:
$x + y = 12$
$3.50x + 4.00y = 40.00$
determine the value of $y$.