Posse Comitatus Act and offered essential review and guidance. The Combined Arms Research Library (CARL) at Fort Leavenworth was also a crucial asset in this endeavor.
Including those, there are 3,077 counties in the US, an average of 62 counties per state. The state with the fewest counties is Delaware (three), and the state with the most is Texas (254). In many states, counties are subdivided into townships or towns and may contain other independent, self-governing municipalities.
By my count there are 3143 Counties, Parishes or Independent Cities in the USA. There are a few oddities to be considered. The District of Columbia has no county government. The District was carved from the states of Maryland and Virginia. The Virginia portion was ceded back to Virginia in the mid 1800s.