The Census of Governments provides data on federal, state, and local governments.
"The Census of Governments identifies the scope and nature of the nation's state and local government sector; provides authoritative benchmark figures of public finance and public employment; classifies local government organizations, powers, and activities; and measures federal, state, and local fiscal relationships."
Since 1957 it has been conducted by the Census Bureau every 5 years in years ending in 2 and 7.
In addition to the federal government and 50 state governments, there are five types of local governments: counties, municipalities, townships, independent school districts, and special districts. See Lists & Structure of Governments - How the Data are Collected for further details.--from FAQ's Census of Governments
2012 Census of Governments: Revised Counts of Governments and Individual State Descriptions — The updated counts of governments are a complete enumeration of state and local governments that were in existence on June 30, 2012. The Individual State Descriptions provide the foundation of how government entities are identified and classified for the U.S. Census Bureau statistics on governments. These estimates and state descriptions are part of the organization component of the 2012 Census of Governments.
Conducted every five years, the census of governments provides the only uniform source of statistics for all of the nation’s state and local governments. These statistics allow for in-depth trend analysis of individual governments and provide a complete, comprehensive and authoritative benchmark of state and local government activity. The organization component is the first of the three components of the census of governments — the employment and finance components are released as separate products.
These counts are an update from the preliminary release on August 2012 and reflect the final enumeration of governments from the 2012 Census of Governments. This release also provides the number of governments by state, by type of government, by size, and by county location. The descriptions for each state and the District of Columbia outline the organizational structure of each state. The summaries are divided according to the five basic types of local governments recognized for the Census Bureau’s classification of government entities — county, municipal, township, school district and special district governments.
Internet address: <http://www.census.gov/govs/go/index.html>.