Visa Inc. interview question

Write a Java class for a certain type of counter function, given some starter code (do not remember the exact problem, but was something on these lines)