Tested in SMW 1.7.0.2:
Produces "0" when there are no results:
{{#ask: [[Category:Existing category]] | format=count }}
{{#ask: [[Existing property name::any property value]] | format=count }}
{{#ask: [[Non-existing property name::any property value]] | format=count }}
Produces nothing when there are no results:
{{#ask: [[Category:Non-existing category]] | format=count }}
Version: unspecified
Severity: normal