I drink 3 scoops of Folgers per day, so I'd say that's about optimal.
Seriously, this isn't something science is gonna help you with. Just tool around and play it by ear. Caffeine is a pretty mild drug, so its benefits will be mild, as will its detriments. Afaik, there is no significant negative impact to caffeine intake beyond just poor sleep. Like, it doesnt give you cancer. So fooling around and seeing what works for you isnt gonna send you to an early grave.
Even caffeine's impact on sleep quantity/quality, I'm kind of doubtful of. Sure it is obvious - but is it really significant? Many cultures around the world have a habit of drinking tea or coffee before bed, which seems like an odd choice if it meant that everyone constantly felt like trash the next morning - so I wonder if other lifestyle factors could improve sleep quality more than caffeine intake decreases it. Seems like a bit of a stretch, but I like to stay open minded.