Add function updateFilterSelectionList()

This is a work in progress: at this step, the totals in each option
never change while the total categories selected becomes 0 in every
update.
Use the same code to count selected categories

This common code could be extracted, but the function call
would actually be longer than the existing code.
Fix updateFilter()

It seems that there was a mismatch in the name of the variable tested,
and I definitely provided the wrong argument listItems where listData
was expected. With these fixes, the totals get updated as expected,
including the total number of categories selected.