For further comparison, the total capacity of existing pumped hydroelectric storage plants is 740 000 GWh. (This puts plans of battery-based electricity storage in a rather harsh perspective.)
I believe this number only includes dams with reverse pumping. The global production capacity for all hydroelectric power is much larger, but it's not a widely used number, since you typically don't empty a reservoir due to the lower water having less potential energy.
So this capacity number is a bit theoretical, since you wouldn't use it that way in practice. But then again, so is the capacity number for batteries, since you really want to avoid doing a full discharge.
Annual global hydroelectric production is a more useful number, and is a little more than 4 000 TWh.
Tesla is.