Metonymy is a figure of speech in which the name of an attribute is
substituted for the thing itself (e.g. "the crown" for the king).
Metaphor
works on the basis of connecting different areas of experience
(e.g. "suffer the slings and arrows of outrageous fortune"), while in
metonymy there is
already a connection between the words (e.g., "counting
noses").