SAN FRANCISCO — A federal count shows the number of homeless people increased by double-digit percentages in three San Francisco Bay Area counties over two years as the region struggled to tackle the growing problem, including 17% in San Francisco and 43% in the county that includes Oakland.

More than 25,000 people were counted as homeless during an overnight tally conducted in San Francisco, Alameda and Silicon Valley’s Santa Clara counties in January. Detailed reports are expected later this year.

“The initial results of this count show we have more to do to provide more shelter, more exits from homelessness, and to prevent people from becoming homeless in the first place,” said San Francisco Mayor London Breed.

The San Francisco Bay Area is grappling with a homelessness crisis driven in part by too little housing stock and a raring tech economy that has widened the inequity gap. In San Francisco, the median price of a two-bedroom home is $1.3 million and a family of four earning $117,400 a year is considered low income.

“We have an affordable housing crisis throughout California,” said Jen Loving, executive director of the nonprofit Destination: Home in Santa Clara County, where homelessness rose 31%.

“It’s not a surprise for those of us doing this work,” she said. “We need more extremely affordable housing. It’s not magic.”

The homelessness point-in-time count is conducted every two years and is required by the US Department of Housing and Urban Development. Los Angeles is expected to release its figures on May 31.

Homelessness is an issue that has riven the Bay Area for years, with elected leaders pledging to do more to address it. However, controversies continually erupt over where to build homeless shelters. Residents of a wealthy San Francisco neighborhood, for example, are fighting the city’s plans to erect a shelter along the waterfront Embarcadero area that is popular with tourists.

In San Francisco, the number of people who were not sheltered surged 20% to nearly 5,200, driven largely by people who are living in cars. In Santa Clara County, which includes the city of San Jose, the homeless population increased 31% to about 9,700 this year.

Alameda and San Francisco counties each counted more than 8,000 homeless.

California Gov. Gavin Newsom has proposed giving cities and counties up to $650 million to build and expand emergency homeless shelters. He’s also proposing $10 million to help public colleges and universities house homeless students and $20 million for legal aid for people facing eviction.