private void invalidateIndexes(final String category) {

        //special case: this is a new last category. Then just build up the index (if it exists) instead of deleting it
        if (category != null && categories.get(categories.size() - 1).equals(category) &&
                !categoryIndexMap.isEmpty() && !categoryIndexMap.containsKey(category)) {
            if (categories.size() == 1) {
                //-> first category added
                categoryIndexMap.put(category, 0);
            } else {
                final String prevCategory = categories.get(categories.size() - 2);
                final int prevIndex = categoryIndexMap.get(prevCategory);
                final int prevCount = categoryCounts.get(prevIndex);
                categoryIndexMap.put(category, prevIndex + prevCount + 1);
            }
        } else {
            //just marke everything dirty
            categoryIndexMap.clear();
        }
        contentIndexListIndexMap.clear();
    }
gets number of content entries in the list
main/src/main/java/cgeo/geocaching/utils/CategorizedListHelper.java