The number of homeless people in the U.S. shrank from 2012 to 2013, according to a large government study that found the number of veterans and others who are homeless declined for the third straight year. But homeless numbers rose in New York and other states, according to the Department of Housing and Urban Development.

The study also found that nearly 20 percent of homeless people were in either New York City (11 percent of the U.S. total) or Los Angeles (9 percent).

The HUD study uses data from a count conducted by U.S. shelters on a single night, in which they reported how many people were using their facilities, and how many were left without shelter. For the most recent Annual Homeless Assessment Report, the data was collected last January.

The tally found that 610,042 people were homeless on that night, reflecting a drop of nearly 4 percent from 2012 to 2013, the agency says. Of that number, 36 percent — 222,197 people — were in families, representing a drop of 7 percent for that group.