How to count the field and add String?

Example i have 3 fields and i wanna add my input to the field after that (NF+1)

SID|Fname|Lname
123123:adds:asdasdasd

Result

SID|Fname|Lname|Number
123123:adds:asdasdasd:123123

---------- Post updated at 02:36 PM ---------- Previous update was at 02:23 PM ----------

Input is likes.

Enter your word you wanna add 
Number

Resuld

SID:Fname:Lname:Number

What you are trying to do is not at all clear. Are you trying to add a string to the end of the heading line or are you trying to add numbers to the ends of other lines in your file?

Why do you care how many fields are in a line in your file if all you are doing is adding a string (or a number) to the end of every line in a file?

What operating system are you using?

What shell are you using?

What code have you written to try to do this on your own?

Is this a homework assignment?

yes this is a part of my homework but i don't know how to solve it. I think i don't need to count the field and just add to the end of the head line. I'm using linux Mint terminal.

Moderator comments were removed during original forum migration.