BUGFIX: count_states misbehaviour when handling switch clauses.