Ice, Fighting, Ground, Flying, Dark, Steel, and either Electric/Grass would cover all 18 Pokemon types. This makes a total of 7 types needed. The types in fancy blue text are the ones that give you the most coverage on a Pokemon's moveset.
Source: Above link
As for the typeset that would cover every single Pokemon...
Ice, Fighting, Ground, Flying, Dark, Steel, Electric, Grass, Fire, Dragon, Fairy.
This covers every single Pokemon for super-effective damage, from Abomasnow to Zygarde, in 11 types.