Fix parsing of counter types

JAVA-219 #fixes