class TransformFeatureSource implements SimpleFeatureSource {

    @Override
    public int getCount(Query query) throws IOException {
        // transforming does not change count, but we have to transform the filter
        Query txQuery = transformer.transformQuery(query);
        txQuery.setPropertyNames(Query.ALL_NAMES);

        // let the world know
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.log(Level.FINE,
                    "The original query for count computation{0} has been transformed to {1}",
                    new Object[] { query, txQuery });
        }

        return source.getCount(txQuery);
    }

    public  TransformFeatureSource(SimpleFeatureSource source, Name name, List<Definition> definitions);

}