Do stock prices have any effect on the money supply of an economy? Please provide a simple example if possible.

Intuition suggests there is more money around when prices are high (consider for instance the dotcom boom). I guess the answer may be dependent on what definition of money supply one uses (M0-M4).