Re: How far can you run a grounding wire?
Dezel the water line can be used as a grounding electrode per 250.52 if it meets the requirements to be an electrode. Most these days do not. However you are still required to bond the metallic water piping per 250.104. These are two completly diffent concepts. Bennie is correct it does not make sense to run an electrostatic charge the length of a building, in this case we may be using the water pipe as a grounding electrode to stablize the voltage to ground and limit overvoltage. The bonding connection is to quickly and safely remove any voltage from the piping being energized. In both cases there are limits on lenght (or size), the grounding electrode case is less clear in the code for its length requirements. The note to 250.122 discussing increasing the size of the equipment grounding conductor.
I suggest you review the following defintions> Ground, grounded, grounding conductor, grounding electrode conductor, and bonding jumper. Your post asked about the "grounding wire" and per the NEC there is no such item, although I think I know what you mean.