Added counters to track layouts.