This expression arose from the former bakers' practice of adding an extra loaf to a dozen sold to a retailer - this representing the retailer's profit.
RELATED IDIOMS :
talk nineteen to the dozen
talk incessantly – British
No convincing reason has been put forward as to why nineteen should have been preferred in this idiom rather than twenty or any other number larger than twelve.
1998 - Pamela Jooste - Dance with a Poor Man's Daughter - He hasn't even got his foot in the door before she's talking nineteen to the dozen and hanging round his neck and asking if he's got sweets in his pocket.