Sugar is countable or uncountable depends upon its meaning for example :
1) sugar (uncountable) :-
Sweet crystal added to drinks like tea and coffee. Example : - soft drinks that contain lot of sugar can contribute to obesity.
2) sugar ( countable) :-
One teaspoon of sugar, or particular type of sugar. Example :- are plant sugar better for you than artificial sweeteners.