You can do this quite easily with oUF, but you'll have to write some code.
Use CustomFilter() to build a list of active debuffs. If a debuff already exist within the list, then increase the stack number and tell oUF not to show the icon. Then you can use PostUpdate() to update the display counter on the icons.
You also have to remember to either wipe the list or reset the stack number after/before each update cycle.