The problem here is the original poster simply said a 2GM. This engine has come in so many variations over the years. While Post number three indeed answered the original question for the engine specified, the conversation has drifted.
The 2GM raw water cooled (sea or fresh water pumped in from the body of water the boat is in) does have two zincs. The 2GM20F, fresh water cooled (as in antifreeze and water that is changed annually) does not have any zincs on the engine nor the heat exchanger(as confirmed by the dealer when I returned the zincs I had bought without fully identifying my engine).
If you add a Sen-Dure heat exchanger, an after market addition made for many different engines, it may or may not have a zinc since they make both copper (zinc required) and Cupronickel (no zinc required) models.
The Yanmar 2GM20F heat exchanger is made of cupronickel. According to Wikipedia, "Cupronickel or copper-nickel is an alloy of copper that contains nickel and strengthening elements, such as iron and manganese. Cupronickel is highly resistant to corrosion in seawater, because its electrode potential is adjusted to be neutral with regard to seawater. Because of this, it is used for piping, heat exchangers and condensers in seawater systems..."
Hope this helps those that were as confused as I was.