The book I learned knots from said that there are ~5 categories of knots and knowing one of each will cover you for most things. The categories were fixed loop, running loop, stopper knot, hitch (rope to object), and bend (joining two ropes).
I have about 4-5 knots memorized for each of those category, but sailing I typically only use a cleat hitch, bowline, and clove hitch (in order of frequency).