Venice has installed gates at the ends of two bridges to turn back tourists if their numbers become overwhelming.