As city officials attempt to get an accurate count of Boston’s homeless population during tonight’s 23rd annual Homeless Census, recent stats on the number of homeless people relying on local emergency rooms are astounding.

Over a five-year period, 119 street dwellers accounted for 18,384 ER visits and 871 medical hospitalizations according to a December report. The average annual health care cost for individuals living on the street was $28,436 compared to $6,056 for to those who find housing.

“Numerous visits to the ER by homeless people is a big drain on hospitals,” Joe Finn of the MHSA said. “Many of the chronically homeless have pretty serious health conditions. Their inability to maintain their health often results in acute hospital stays.”

Jim Greene of the Boston Public Health Commission said the city is working on the issue.

“When the Romney Administration slashed substance-abuse funding, we saw a 40 percent loss in detox beds and a 59 percent increase in homeless people hospitalized in ERs in ’03 and ’04,” Greene said. “When we restored substance-abuse treatment capacity, those numbers started to come back down.”

Each December, Greene’s department counts people in domestic-violence, mental-health and substance-abuse treatment programs, people living on the streets, at emergency shelters, in transitional housing or in specialized programs serving homeless youth and homeless Veterans.

“It’s a big sign the City of Boston is committed to ending the problem,” Finn said.