diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index bf664c6..903632e 100644
a
|
b
|
class BaseQuery(object):
|
332 | 332 | # in SQL (in variants that provide them) doesn't change the COUNT |
333 | 333 | # output. |
334 | 334 | number = max(0, number - self.low_mark) |
335 | | if self.high_mark: |
| 335 | if self.high_mark is not None: |
336 | 336 | number = min(number, self.high_mark - self.low_mark) |
337 | 337 | |
338 | 338 | return number |
diff --git a/tests/modeltests/lookup/models.py b/tests/modeltests/lookup/models.py
index 11e2b07..4655492 100644
a
|
b
|
Article 4
|
80 | 80 | 6L |
81 | 81 | >>> articles[10:100].count() |
82 | 82 | 0 |
| 83 | >>> articles[:0].count() |
| 84 | 0 |
83 | 85 | |
84 | 86 | # Date and date/time lookups can also be done with strings. |
85 | 87 | >>> Article.objects.filter(pub_date__exact='2005-07-27 00:00:00').count() |