We're seeing that, when a particular filter we've created is used, the API will return "comment_count": 1 for questions with no comments.
For a search for questions with no answers, ordered by descending creation date, with our filter applied: Many questions with no comments are returned with "comment_count": 1.
Here's the response for question ID 28269098, with comment_count added to the default filter. It correctly returned "comment_count": 0 (back when the question didn't have any comments):
{
"items": [
{
...
"comment_count": 0,
...
"question_id": 28269098,
"link": "http://stackoverflow.com/questions/28269098/resize-uibuttons-iphone-5-to-iphone-6-ratio",
"title": "Resize UIButtons iPhone 5 to iPhone 6 ratio"
}
But here's the response for question ID 28269098, with our problem filter applied, which incorrectly returns "comment_count": 1 for the same question:
{
"items": [
{
...
"comment_count": 1,
...
"question_id": 28269098,
"link": "http://stackoverflow.com/questions/28269098/resize-uibuttons-iphone-5-to-iphone-6-ratio",
"title": "Resize UIButtons iPhone 5 to iPhone 6 ratio"
}
(Editor's note. Now that that question has comments (currently 3), the OP's query returns the correct number. But I have confirmed this bug on posts with no comments.)
Why is comment_count returning an invalid value, for comment-less posts, when we use our filter?