Reduced memory requirements for test_counting_single.py