The crash happens because ListFiltered is null when getCount() is called. Fix it by changing getCount()
to:
return listFiltered != null ? listFiltered.size() : 0;
Also, move filterResults.count and filterResults.values outside the loop in performFiltering() to avoid inconsistent behavior.