Answer: it depends, and sometimes both are legally liable. Every hospital has written procedures and protocols for the correct counting and inventory of any products utilized during surgery like sponges, gauze, towels, forceps, clamps, needles--you name it. In fact, one or more members of the surgical team usually documents at the end of the procedure that "all sponge/needle counts are correct."
Despite this "documentation," hundreds if not thousands of "foreign objects" are left in patients every year in this country. In a case I co-counseled a few years ago, a surgeon left a large towel inside a patient's chest cavity and, sure enough, the count of objects used during surgery was "correct" in the surgery record.
If the surgeon is an employee of the hospital, the hospital is liable anyway and it really doesn't matter if the surgeon or surgical team was responsible for dropping the ball (or perhaps dropping the sponge is a more accurate phrase).
But what if the surgeon is not employed by the hospital? As pointed out here, some states impose on the surgeon an independent legal duty to verify a correct count at the end of the procedure. If this is the case, both the surgeon and the hospital can be jointly liable for negligence.
In other states, the surgeon is considered the "captain of the ship" and can under certain circumstances be held solely liable. In Ohio, one or both can be held liable, and this makes sense given the fact that hospitals can and should have procedures in place for their surgical team-employees to mandate an accurate count.
But one thing is clear: when something like this happens, you can expect some finger pointing between the surgical team and the surgeon, with each claiming the other messed up the count. It reminds me of an old Bill Cosby comedy album (yes, an album and not a CD, so I'm dating myself) I used to own where he joked that he had re-named his kids "I don't know" and "not me" because that was their standard response when grilled by him after something got broken....