More Hispanics were counted in the census than anticipated, reflecting the difficulty of calculating the size of the Hispanic population in states where the communities are small and growing rapidly, according to a new study.

The 2010 Census counts of Hispanics were higher in 23 of the first 33 states whose population counts were released, including Virginia and Maryland, the Pew Hispanic Center’s analysis showed. Most of the growth was in states that have fewer than 1 million Latinos and that are relatively recent destinations for large numbers of Hispanics, underscoring how Hispanics have spread to communities where they haven’t lived before.

The Pew analysis compares the actual count made in April with annual estimates the Census Bureau makes using birth and death records. The estimates are useful to demographers and planners. More importantly, they are the basis for determining how billions of dollars in federal funds are distributed.

In Virginia, 40,000 more Hispanics were counted in the 2010 Census than expected, based on previous census estimates. The difference between the 592,000 thought to be residing in the state and the 632,000 actually counted was almost 7 percent.

The gap was larger in Maryland. The census counted 471,000 Hispanics instead of the 425,000 estimated, an almost 11 percent difference. Detailed statistics for the District have not been released.

The biggest discrepancy Pew found was in Alabama, where the census count of 186,000 people was 16 percent higher than estimated.

In contrast, gaps were much smaller in many states with large and long-standing Hispanic communities. In California, Colorado, Illinois and Texas, for example, the actual count and the estimate varied by less than 1 percent, Pew said.

Because the estimates were so accurate in these states with a lot of Hispanic residents, the total nationwide census count of about 39 million Hispanics was 1.5 percent higher than previous census estimates had suggested.

That was a considerable improvement. The 2000 Census count of 35 million Hispanics was almost 10 percent higher than census estimates. In some states that year, the count was 50 percent above the estimate.