Mindy and Troy ate total of 9 pieces of the wedding cake. Mindy ate 3 pieces and Troy ate 1/4 of the total cake. Write an equation to determine how many pieces of cakes (c) were in total.