As Catija mentions in the comments, "liquid" may also be used as an uncountable noun.
Many nouns that are otherwise non-count (let's use as an example noun "X") may be used as count nouns with the implication being "a specific type of noncount noun X".
This seems to apply to most words for states of matter. We can speak of "liquid," "gas," "fluid" but we can also speak of "a liquid," "a gas," "a fluid."
Other examples: "red wine" (uncountable) vs. "a red wine" (countable), "vapo(u)r" (uncountable) vs. "a vapo(u)r" (countable).
A good learner's dictionary should list such nouns as being able to be used in both ways, countable and uncountable.
This might not be a very satisfying answer, but in general it's not easy to predict if a word will be countable or uncountable just from the meaning. "Fruit" is generally non-countable, while "vegetable" is countable. "Peas" is countable, but "corn" is non-countable. "Furniture," "silverware" and "clothing" are non-countable, although we can have singular items of any of these.
In a comment below another question, John Lawler wrote:
Virtually all mass nouns can be used as if they were count nouns under
certain circumstances, and vice versa.
Another question that might be of use: When can you pluralize uncountable nouns? (As far as I know, any nouns that can be pluralized can also be preceded by the singular indefinite article "a".)