Native speaker here, not American ... and it's fine. It's much more likely to be used in the evening when the daytime (or at least the coffee-drinking part of the day) is over. At 9pm, I would definitely not say "I have drunk ..." unless I'm the kind of person who might drink a coffee after that time.
It's an indefinite direct object. Accusative is only used with definite direct objects.
Genitive would only make sense if you're thinking of the "of" in a very strange way. "Cups of coffee" could, in theory, be translated as kahvenin fincanları but that would mean that you drank five of coffee's cups (in other words, five cups which belonged to coffee) ... and this doesn't make sense because (A) coffee cannot own cups and (B) you cannot really drink cups ...
When you want to indicate a quantity of something by mentioning a container, you simply place the word for that container (in the nominative) before the substance, which takes whatever case it needs to make sense in the sentence.