A martini garnished with an olive and one garnished with a lemon twist are not the same drink. The garnish is doing enough that it changes the character rather than the appearance.
The olive
Contributes salt and a savoury, briny note, both from the olive itself and from whatever brine clings to it.
The result is a savoury martini, which suits a drier preparation and pairs well with food.
It also contributes over time. An olive sitting in the glass slowly releases into the drink, so the last mouthful is saltier than the first.
Quality varies enormously. A good firm green olive in decent brine is a considerably better thing than a soft one from a jar of cheap liquid.
Stuffed olives introduce whatever they are stuffed with, and a blue cheese olive is a legitimate and divisive choice.
The twist
Contributes citrus oil expressed over the surface, which lifts the botanicals in gin and brightens the whole drink.
It adds essentially no flavour to the liquid, working entirely on the aroma.
The result is a fresher, more aromatic martini, and it is the better choice for showing off a gin with interesting botanicals.
Expressing it is what makes the difference. A peel dropped in unsqueezed does almost nothing.
The onion
A martini garnished with a pickled cocktail onion is a Gibson, and it is a genuinely different drink rather than a novelty.
The onion brings vinegar sharpness and a distinct allium note, producing something savoury and considerably more assertive than an olive does.
Good pickled onions matter here more than anywhere, since a cheap one is harsh and one-dimensional.
The Gibson has a modest following and deserves a larger one.
Dirty
Olive brine added to the drink itself, typically ten to fifteen millilitres, along with an olive garnish.
The result is savoury, saline and cloudy. Filthy means more brine still.
Brine from a jar of good olives is far better than the thin salty liquid from cheap ones, and some bars now make their own.
The salt content is worth knowing about for anyone advised to limit sodium, since a dirty martini contains a meaningful amount.
It divides opinion sharply, and vodka arguably suits it better than gin, since the brine and the botanicals can otherwise compete.
Which suits which base
A gin martini with a twist showcases the botanicals, which is where gin has the most to offer.
A gin martini with an olive is savoury and excellent with food, and the juniper and brine work well together.
A vodka martini benefits from a garnish more than a gin one does, since the vodka contributes little flavour and the garnish is doing proportionally more work.
A Gibson works with either and is particularly good with a fuller-bodied gin.
How many olives
The convention is an odd number, one or three, which is superstition rather than technique.
One is the sensible answer. Three occupy a substantial proportion of a small glass and displace the drink.
On a cocktail stick rather than loose, so they can be removed and eaten without fishing.
Practical points
Rinse olives briefly if you want the olive without much brine, or leave them wet if you want the salt.
Keep them cold, since a room-temperature olive warms the drink.
Use a clean fork or stick rather than fingers when taking them from a jar.
And do not use the trident end of a bar spoon and then put it back in the drink, which is what it is for and also transfers brine.
Trying it
Make two small martinis, one with an olive and one with a twist, and taste them together.
The difference is larger than most people expect from a garnish, and it settles the question of whether garnishes matter more effectively than any argument.
Storing them
Olives and onions keep in their brine in the fridge for months once opened.
Keep them submerged, use a clean utensil rather than fingers, and discard if the brine turns cloudy.