From Spanish municipios to American counties
Before independence, the territory that would become Texas was administered through Spanish (and later Mexican) municipios — large local jurisdictions centered on a town. When Texas declared independence in 1836, the new Republic converted 23 of these municipios into the first Texas counties, including Austin, Bexar, Brazoria, Colorado, Goliad, Gonzales, Harris (then "Harrisburg"), Jasper, Jefferson, Liberty, Matagorda, Milam, Mina, Nacogdoches, Red River, Refugio, Sabine, San Augustine, San Patricio, Shelby, Victoria, and Washington.
Annexation and the great wave of creation
After Texas joined the United States in 1845, settlement pushed west and the Legislature carved new counties out of vast existing ones at a rapid clip. By 1860 the count had nearly tripled. The Reconstruction era and the railroad boom of the 1870s–1880s sparked another wave; counties like Hartley, Oldham, Sherman, and Moore were laid out across the Panhandle largely on paper, awaiting settlers.
The final county: 1931
Texas's 254th and final county was Kenedy County, created in 1921 from a portion of Cameron County, with Loving County reorganized in 1931. No new Texas county has been formed since — the Texas Constitution makes county creation cumbersome, requiring legislative action and local voter approval.
Why so many?
When the Republic and early state legislatures drew county boundaries, they aimed for residents to be able to ride to the county seat and back in a single day on horseback. With 268,597 square miles of territory and a horse-and-buggy standard, that math produces a lot of counties. Other large states (California, Montana, Nevada) drew their boundaries decades later in the railroad era, when residents could travel much farther in a day — so they ended up with far fewer.