"Coffee" can mean "cup of coffee" sometimes, and that is countable. You could order three coffees and a Coke at the fast-food counter, and the girl could ask you, "How many coffees was that?" "How many coffee?" is not possible. The three words in a row "how many coffee" is of course unremarkable in the right context, for example, "How many coffee growers are there in that region?"