Adding counter to layout