Leeches are freshwater organisms. They require low-salinity environments—ponds, lakes, slow streams, marshes—to survive and reproduce. Cape Cod is a glacial peninsula surrounded by the Atlantic Ocean (saltwater) and Cape Cod Bay (brackish to saltwater). Its ponds and kettle holes are freshwater, but leeches are not established there in notable numbers.
So enjoy the beaches—leech-free.