Mrs Lim bought a number of plates at an average price of $6. She decided to buy another plate which cost $18. The average price of all the plates then became $8. What was the total number of plates Mrs Lim bought in all?​