First there are Contest Ribbons in D/P/Pt. There are 5 different types (Cool, Beauty, Smart, Tough, Cute) and each one has 4 ranks (Normal, Great, Ultra, Master). This makes 20 in total.
There is one ribbon for each day from Julia in Sunyshore City, so 7 in total.
There are 6 ribbons at the Battle Tower for various winning streaks.
Mr. Footprint on Route 213 will give you the Footprint Ribbon if your pokemon has maximum happiness.
Each pokemon on your team gets the Sinnoh Champ Ribbon when you beat the Elite Four.
The lady in the seal shop in Sunyshore gives you the Effort Ribborn when you max out your EVs.
There are also many event ribbons attached to pokemon you get from events.