When any bridge or proposed bridge is on the dividing line between two counties which is also the dividing line between one county and a municipality in the other county and such municipality has authority to build or rebuild such bridge or to join with any county therein, said county may join with said municipality in the other county in building or rebuilding such bridge. The cost of such bridge shall be paid in such proportions as shall be agreed upon by the county and municipality so joining.
16 P.S. § 2654