synchronized (featureCollection) {
if (featureCollection != previousFeatureCollection) {
previousFeatureCollection = featureCollection;
count = null;
try {
CalcResult result = calculateCount(featureCollection);
if (result != null) {
count = result.getValue();
}
} catch (IllegalFilterException e) {
LOGGER.log(Level.FINER, e.getLocalizedMessage(), e);
} catch (IOException e) {
LOGGER.log(Level.FINER, e.getLocalizedMessage(), e);