“This seems to be really a transparent attempt at a pretext to try to justify discriminatory law,” said Lucas Guttentag, a professor of immigration law at Yale Law School and senior counsel of the Immigrants’ Rights Project of the American Civil Liberties Union. “The idea that they’re somehow going to collect this data and show anything that’s conceivably relevant is a fantasy.”

In Plyler v. Doe, Professor Guttentag said, the court found that the state’s actions were unconstitutional on a number of grounds. The state’s failure to show the impact of illegal immigration on schools was only a part of the decision, he said, and a nuanced one at that. The likelihood that the data collected by this law would lead to that decision’s being overturned, Professor Guttentag said, was extremely low.

Though there has not been a direct census, there are estimates of illegal immigrants in Alabama schools. According to American Community Survey data, a little less than one-half of 1 percent of the 800,000 children in Alabama schools are in the country illegally; of the 34,000 Hispanic children in Alabama schools, according to Pew Hispanic Center estimates, roughly two thirds are American citizens.

The law also requires schools to track the enrollment of illegal immigrants in remedial English programs (though this part, too, was ignored in the state’s actual execution of the law). There is existing data about the national origin of such students, at least at the district level.

Here in Shelby County, which has one of the fastest-growing Hispanic populations in the state, there are about 1,400 remedial English students, out of roughly 18,700 statewide. They came into the schools here speaking 52 languages, including Chinese and Arabic, though the majority came in as Spanish speakers, said Leah Dobbs Black, the English as a Second Language program supervisor for the county.

Ten years ago, she said, as many as 9 out of 10 students in need of remedial English were born outside the country, a fact students already report on language assessment forms. Now, she said, “It’s at least 50-50.”

Ms. Black added that Shelby schools spend about $4 million on the program out of an annual budget of $281 million, though she acknowledged that parents tend to complain more about the money spent on that program than others.