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

While I don't know how to properly define "the total amount of money", intuition suggests there is more money around when prices are high (consider for instance the dotcom boom).