Index: django/core/paginator.py
===================================================================
--- django/core/paginator.py	(revision 7950)
+++ django/core/paginator.py	(working copy)
@@ -53,12 +53,12 @@
     def _get_num_pages(self):
         "Returns the total number of pages."
         if self._num_pages is None:
-            hits = self.count - 1 - self.orphans
-            if hits < 1:
-                hits = 0
-            if hits == 0 and not self.allow_empty_first_page:
+            if self.count - self.orphans <= 0 and not self.allow_empty_first_page:
                 self._num_pages = 0
             else:
+                hits = self.count - 1 - self.orphans
+                if hits < 0:
+                    hits = 0
                 self._num_pages = hits // self.per_page + 1
         return self._num_pages
     num_pages = property(_get_num_pages)
Index: tests/modeltests/pagination/models.py
===================================================================
--- tests/modeltests/pagination/models.py	(revision 7950)
+++ tests/modeltests/pagination/models.py	(working copy)
@@ -140,6 +140,16 @@
 >>> p.end_index()
 5
 
+# Check edge case: with allow_empty_first_page=False and list len=1, num_pages should be 1
+>>> paginator = Paginator([1], 5, 0, False)
+>>> paginator.count
+1
+>>> paginator.num_pages
+1
+>>> paginator.page_range
+[1]
+
+
 ################################
 # Legacy API (ObjectPaginator) #
 ################################
