The state of Texas is ivided into 254 counties, more than any other U.S. state. Texas was originally divided into municipalities, a unit of local government under Spanish and Mexican rule. When the Republic of Texas gained its independence in 1836, there were 23 municipalities, which became the original Texas counties. Many of these would later be divided into new counties. The most recent county to be created was Kenedy County in 1921. The most recent county to be organized was Loving County in 1931.