Handle undefined correctly in Builder._counter().