Sorry my mistake. The counter is being updated in onMessage() shown here:
public void onMessage(Message message) throws java.lang.InterruptedException {
String txt = message.getMessage().toLowerCase();
if (txt.contains("you hammer")) {
barsDone++;
}
}
There is a while statement in my while loop that check for the animation which as print the message that I am looking for.
Fixed the issue. Did away with my while loop. Seems like that was causing the issue