Added transition counting