Converted counter to bools to avoid int overflows.