What size are the screws used for water bottle mounts etc? There's one size of bolt that's used all over modern bikes: water bottle mounts and the braze-ons for racks leap to mind. Whenever I need a few, I take one to the hardware store and sift through the boxes of bolts until I find one that matches. I foolishly never write the size down.

What size are they? I'm only concerned with the width and the threads, not the heads or the length.
Strictly speaking the answer should be M4, M5 or M6.  This specifies the threading as well* (M4x0.7, M5x0.8 and M6x1 is implied, where the thread is given in mm/turn).  The hex key for turning them will also have a size in mm, always smaller than the diameter, by how much depends on the head shape.

I would say M5 are the most common, based on a very small sample size.

*There are technically fine and extra fine metric threads, but you won't find them on a bike or in a hardware store.