“We don’t need the federal government trying to define who’s in the community,” said Mayor Catherine Pugh of Baltimore. “This is about bodies, it’s not about whether you’re an immigrant.”

In Houston, the city suspects that many immigrant households devastated by Hurricane Harvey never reached out for government assistance, and those programs offered tangible benefits to residents whose homes and cars had been flooded.

“If you are reluctant to reach out because of your fear that ICE may show up, for fear of being deported, then how do you think people are going to feel when you’re asking them to go online or to respond to an enumerator that’s knocking on your door to fill out a census form?” Mayor Sylvester Turner of Houston said. “They’re going to be apprehensive.”

In San Jose, the city will rely on community volunteers this spring to scour neighborhoods where it suspects many families are doubled up or living in unpermitted housing. On the street with the beige garage conversion, Mr. Almeida could point to a clue on nearly every property. Peeking over a fence, he spied another garage with a satellite dish mounted outside. One home had an R.V. that looked to be permanently stationed in a large carport. Across the street, a home zoned for just one unit had a second address posted outside. The home next door had two satellite dishes on the chimney and a third on the garage.

This spring, volunteers will use a texting app the city tested in December to identify these a nd similar units. The city will then flag them on the Census Bureau’s master address list for San Jose. Mr. Almeida vows that the city department in charge of building code enforcement will never see these address notes, and the Census Bureau requires confidentiality from the local officials who do access them. A nonprofit founded by the former New York mayor Michael Bloomberg, Cities of Service, is hoping to spread the tool to other cities that will be receiving their address databases from the census in the coming weeks.

In New York City, half a dozen workers in the planning department have been similarly canvasing neighborhoods for the last 15 months. Ahead of the 2000 count, the first time the Census Bureau allowed cities to review their addresses, New York found 439,000 units the bureau was missing — the equivalent of 13 percent of the city’s housing stock — mostly in illegal basement, attic and garage apartments revealed by extra doorbells and mailboxes.