Common interface with different return types
Normally when you need "different return types", you can use generics. However, since you want these Counters to be in a List of some sort, using generics goes out the window since a List cannot be defined properly to contain both Counter&lt;List&lt;File&gt;&gt; and Counter&lt;Integer&gt;, so the only solution would be to have a List&lt;Counter&lt;?&gt;&gt; in which case the reason for using generics in the first place is lost.

Your CounterDTO class makes sense if a Counter counts more than one of the things. If the counter is only meant to return an int or a list of files, then using a CounterDTO is quite useless since many fields will be null.

Regarding Banthar's comment to your question, you could modify your existing interface to

int count(List&lt;File&gt; files);


It would then be the job for a single utility method (or two) to create a list of files from these parameters: File startDirectory, boolean recursive, List&lt;String&gt; fileExtensions.

As for the question about return type... If you need an interface for this or not depends on how you are using these counters. And also: Which possible counters are there? If you have one counter for returning total line count and one for returning a Map&lt;File, Integer&gt; of line counts, then you don't need two different counters. Since you need to know all the line counts in all the files to know the total line count, using a CounterDTO makes perfect sense here.