In your example it doesn't matter, since you do nothing with the value returned by ++counter.
The only time it makes a difference is when you are using the value returned by the post/pre-increment operator.
For example, if you had a return counter++; or a return ++counter; statement, your method would return a different result based on which operator you used.