Some nouns have both forms. The opposite of countable nouns is uncountable nouns.
Example
'Apple' is a countable noun, 'coffee' is both countable (representing a cup of coffee) and uncountable (meaning the product).
In the classroom
This is a problematic area, countable nouns are often taught as nouns that can be counted. However, this is not a consistent explanation and also varies from language to language, e.g. bread is uncountable in English but not in other languages. There are also rules concerning determiners such as 'many' and 'some'.
Further links:
https://www.teachingenglish.org.uk/article/shopping-minimarket