def METHOD_NAME(expected_count):
    # count() should save the result of the query in the cache
    assert queryset.count() == expected_count
    # the count query has been cached
    inserted_cache_entry = cache.get("count")
    assert inserted_cache_entry is not None
    assert inserted_cache_entry[1][0] == expected_count