Adding row and column counter