Numbering and calculations with AWK