Brian McGeough (22) stabbed Thomas Gaffney while being restrained outside The Waterside Pub, Howth.
Mr Gaffney told Judge Katherine Delahunt that the doctor stitching his leg had stopped counting at 100 and that he had received three layers of stitches in the wound.
He said he had lost in excess of six pints of blood on the night and had to use crutches for several weeks afterwards.
McGeough, of Rivervalley Road, pleaded guilty to assaulting Mr Gaffney causing him harm on August 25, 2007. He has 10 previous convictions for public order offences that were dealt with in the District Court.
Judge Delahunt adjourned sentencing until next week to allow her to consider the case.
Detective Garda Andrew Dignan told Mr Remy Farrell, prosecuting, that Mr Gaffney was in his office at the pub at 1am when a staff member told him McGeough was in the pub looking to be served.
Mr Gaffney told him it was too late but agreed he could buy some alcohol to take away.
McGeough began taunting a customer and when Mr Gaffney intervened McGeough punched him in the ribs. Mr Gaffney, a customer and a barman brought McGeough outside and decided to restrain him until gardai arrived as he was becoming aggressive.
Mr Gaffney then noticed blood and realised he had a stab wound to his leg.