code: def test_filter_results_count():
      schema = fields.Schema(
          id=fields.STORED,
          django_ct=fields.ID(stored=True),
          text=fields.TEXT,
      )
      with TempIndex(schema) as ix:
          with ix.writer() as w:
              w.add_document(
                  id=1,
                  django_ct=u("app.model1"),
                  text=u("alfa bravo charlie"),
              )
              w.add_document(
                  id=2,
                  django_ct=u("app.model1"),
                  text=u("alfa bravo delta"),
              )
              w.add_document(
                  id=3,
                  django_ct=u("app.model2"),
                  text=u("alfa charlie echo"),
              )
  
          with ix.searcher() as s:
              q = query.Term("django_ct", u("app.model1"))
              r1 = s.search(q, limit=None)
              assert len(r1) == 2
  
              q = query.Term("text", u("alfa"))
              r2 = s.search(q, filter=r1, limit=1)
              assert len(r2) == 2
  
file_path: whoosh/tests/test_collector.py
imports: from __future__ import with_statement
  import pytest
  from whoosh import collectors, fields, query, searching
  from whoosh.compat import u, xrange
  from whoosh.filedb.filestore import RamStorage
  from whoosh.util.testing import TempIndex
label_desc: Use image node_id 8 for calling a global function with example usage: test_filter_results_count() without return types