A container has peppermint gum and spearmint gum. There are 32 pieces of peppermint gum in the container and the ratio of peppermint gum to spearmint gum is 8 to 7. Find the number of pieces of spearmint gum in the container.