Uncountable:
* General sense: When referring to the public as a whole, it's uncountable.
* *The public needs to be informed about this issue.*
* *The public opinion is important.*
Countable:
* Specific groups: When referring to specific groups of people, it becomes countable.
* *There were two publics involved in the debate.* (two distinct groups of people)
* *The company targets multiple publics with its marketing campaign.*
Therefore, whether "public" is countable or uncountable depends on how you're using it.