adding count_selections.py and supporting files