"I need a coffee" is a very common shortening of "I need a [cup of] coffee." In the UK they shorten it somewhat differently as "I need a cuppa [tea]"
"I need coffee" may have the same effect, but the meaning is more, "I need some coffee in my system, now, before I fall asleep."
"I need coffee" is often the first sentence someone says when they wake up in the morning. They don't really care whether it comes in a cup or a bottle at that point.
- For Teachers