You're not counting the coffee, you're counting the CUP. Basically, you are asking for "two cups of coffee".
Imagine an ocean of coffee! The coffee itself is not countable. Put it in a cup. A cup is countable, right?
Hope that helps! You're counting cups, not 'coffee'. Think "I'll have 3 waters, please."
It's like "I'll have 3 BOTTLES of water, please!"