San Francisco has more drug addicts than it has students enrolled in its public high schools, the city Health Department’s latest estimates conclude.

There are about 24,500 injection drug users in San Francisco — that’s about 8,500 more people than the nearly 16,000 students enrolled in San Francisco Unified School District’s 15 high schools and illustrates the scope of the problem on the city’s streets.

It’s also an increase of about 2,000 serious drug users since 2012, the last time a study was done.

“There is an opioid epidemic in this country, and San Francisco is no exception,” Deputy Director of Health Dr. Naveena Bobba said.

The problem is particularly visible in the Tenderloin, where police reported more than 600 arrests for drug dealing last year. And where 27 suspects were booked into County Jail for dealing drugs in the first 20 days of the new year.

The out-in-the-open use of drugs on city sidewalks and at the Civic Center BART Station was a huge embarrassment for the city and triggered more police patrols and crackdowns in the past year. The BART station has been cleaned up, but the problem continues in the Tenderloin.

And while the police stay busy targeting dealers — the criminal side of illegal drugs — the city’s public health officials work the problem as a health crisis.

Last year there were 193 drug overdose deaths, of which 112 were from opioids.

“As to why people use drugs, that is a complicated question, and there are many factors,” Health Department spokeswoman Rachael Kagan said. “Our focus is on saving lives and lowering the barriers to treatment.”

Health workers’ tools include providing methadone on demand and expanding street addicts’ access to buprenorphine, a medication that helps people fight opioid addiction.

The department has also been handing out naloxone, a drug that reverses opioid overdoses immediately and keeps people from dying, to first responders, street health teams, homeless drop-in center workers — even library staffers, in an effort to reduce the death toll.

The anecdotal evidence seems to show those actions are having some effect.

“It is notable that the number of opioid overdose deaths has remained essentially flat” for the past four years, Kagan said.

And in an effort to reduce infections and disease transmission among injection drug users, the city also handed out a record 5.8 million free syringes last year — about 500,000 more than in 2017.

“The drugs of choice among the homeless appear to be heroin during the day, and methamphetamine at night — to stay up,” said Eileen Loughran, who heads the city’s syringe access and recovery program. Loughran said on average an addict shoots up three times a day, “but some people do more.”

While City Hall solidly supports the free syringe program, the proliferation of needles on city sidewalks and parks was a major issue in Mayor London Breed’s mayoral election last year — one she promised to clean up.

The first step was spending an extra $1.8 million last year to retrieve needles. That resulted in 500,000 more syringes being dropped off in new kiosks or picked up by special cleanup crews compared to 2017.

But even with the 300 percent increase in the needles returned to kiosks and a 100 percent increase in the needles picked up by cleanup efforts, the department handed out about 2 million more syringes than it got back.

“There are places like Walgreens that have drop-off boxes for syringes that we don’t have data on,” Loughran said. “And people may get their syringes in San Francisco and take them over to Alameda County or other places too far away for us to count.”

Meanwhile, needles are still making their way into the city’s parks and onto the sidewalks.

For example, attendants cleaning the restrooms at Victoria Manalo Draves Park near Folsom and Sixth streets found 123 needles in 2018. The good news is that needle count was down 27 from 150 in 2017.

Going in the other direction, the city’s 311 call center received 9,659 calls complaining about needles citywide in 2018 — up about a third from 2017.

Nonetheless, the Health Department says things are improving.

“We are hearing from people that it looks better out there, and we are glad that these efforts are making a difference,” Kagan said.

San Francisco Chronicle columnist Phillip Matier appears Sundays and Wednesdays. He can be seen on the KPIX-TV morning and evening news. He can also be heard on KCBS radio Monday through Friday at 7:50 a.m. and 5:50 p.m. Got a tip? Call 415-777-8815, or email pmatier@sfchronicle.com. Twitter: @philmatier