A coffee shop sells coffee and pastries. The relationship between the number of cups of coffee $x$ sold and the number of pastries $y$ sold can be described by the linear equation:
$$y = -rac{1}{2}x + 10$$
This equation indicates that for every cup of coffee sold, the number of pastries sold decreases. If the coffee shop sells 8 cups of coffee, how many pastries will it sell?