Using a sharp knife, cut the kernels off the cob; reserve the kernels for a later use.
Using the side of a spoon or a butter knife, scrape down the sides of the cobs into a deep stockpot to release the "milk" and loosen any bits of corn. Add 8 cups water to the pot, along with the salt, peppercorns, garlic, bay leaf and onion. Bring to a boil over medium-high heat. Reduce the heat to medium low and let the broth cook for 20 minutes. Let cool slightly.
Pour the broth through a fine-mesh sieve to strain out the vegetables and bits of corn (a pot lined with cheesecloth works well too). The broth is now ready to use as a base for soups, stews and sauces. If not using immediately, transfer to glass jars and let cool completely. Store tightly covered in the fridge for up to 1week, or in the freezer for up to 2 months.
Technique Tip: Break the ears in half before cutting off the kernels. The smaller size and flat edge where it's broken allows for a sturdier grip when holding the cob on a cutting board.