simplify counting input layout xml