Ruth baked a big cake to sell during the school fair. She cut the cake into many equal pieces. She sold two- thirds of the pieces. She gave half of the remaining pieces to her friends. She then had 6 pieces left to bring home. Into how many pieces did she cut the cake?