I am sure the amount is random, but it's set before hand for each player. There's a new value in the url when you discard stuff maybe that acts as counter. It is like the Old Grumpy King avatar. You get it always when you meet the requirements (but meeting those requirements it's the random part).
This seems like a more likely solution to the Rubbish avatar, compared to discarding a certain number specifically, or specific items. I'ma wait it out. I've already discarded 3~4k items and haven't gotten it. So, I'm no going to bother doing anything else until someone finds a solution. I'd bother to help, but I'm incredibly lazy...