Generally, I would suggest getting a good selection of the basic spectrum. Depending on your style of painting, this could be as simple as getting one each of the primary colours, plus white and black and maybe washes to get you started into shading, but I would consider using a triad approach if you haven't been painting for a longer time.
This would mean getting a set of three matching tones of any colour to provide a base, shade and highlight. Personally, I prefer to apply shades as washes, but that is a matter of taste.
My personal paint "collection" has three to five shades each of red, green, yellow and blue, plus a large variety of browns (because I like "Earth" tones) and various "whites" (e.g. bones, sand, beige) for convenience, so as not to have to mix them up anew all the time. Added to that are two "silvery" metals (Vallejo Gunmetal, Revell Aqua Aluminium) and three to four tones of "gold", usually copper and brass in various shades. The Revell Aluminium in particular combines very nicely with Vallejo transparent colours to create some interesting metallics.