I am trying to reconstruct the evolution of the livestock herd in the XIX century but can't find any data prior to 1840. I am particularly interested in finding out the size of the national herd from 1780-1800. Any help would be really weldome.
It would have been negligible - if you’re talking about livestock brought over by Europeans. Just small farmsteads spread out over the east coast. The Louisiana Purchase purchase wasn’t until 1803 which is often considered as the beginning of “Westward Expansion.” The big livestock areas of the US (still) are the midwest, great plains, and western states.
Try contacting the Livestock Conservancy (https://www.livestockconservancy.org/). They may be able to provide some information or give you additional resources.
From the historical perspective it is important to more strictly define your goal. Remember that in the 1787 the newly formed united states did not extend much beyond the east coast. Before 1787 you would need to discuss the various 'states' as countries united under the articles of confederation. Also, the Spanish crown had settlements in New Mexico for a long time by then Santa Fe was founded somewhere around 1610 (I would have to look it up). So I would say first narrow down your question ie. "Herd size in North America between 1780-1800," "The American States prior to 1787," or "The United States from 1787-1800." Good sources might be records for provisions from the Continental Army, and the first US census conducted under the us constitution in 1790. Both might be available at the Library of Congress or National Archives. Overall sounds like a very cool project! Please feel free to DM if you need ideas of where to look! Good Luck!
By the USA when it became independent, do you mean what is now the USA or what was the USA at that time, because if it is the latter, perhaps you should look for Spanish or Mexican sources, which kept very good records (whether the archives are digitised is another matter).