District attorneys general with responsibility for prosecuting offenses in counties with populations of less than five hundred thousand (500,000), according to the 1990 federal census or any subsequent federal census, and with a charter form of government pursuant to title 5, chapter 1, part 2, also are authorized to contract or enter into an agreement with such counties for the prosecution of violations of the ordinances of such counties.