while loop DATA

I have a datafile contain:

1;n;b;c
2;n;b;c
3;n;b;c
4;n;b;c
5;n;b;c
6;n;b;c
7;n;b;c
8;n;b;c
9;n;b;c
10;n;b;c

My program code:

cnt=1
IFS=";"
while read a b c d; do
echo $a $b $c $d
done<datafile

My result:

1 n b c
2 n b c
3 n b c
4 n b c
5 n b c
6 n b c
7 n b c
8 n b c
9 n b c
10 n b c

My wanted-result

1 n b c list[1] row[1]
2 n b c list[1] row[2]
3 n b c list[1] row[3]
4 n b c list[1] row[4]
5 n b c list[1] row[5]
6 n b c list[2] row[1]
7 n b c list[2] row[2]
8 n b c list[2] row[3]
9 n b c list[2] row[4]
10 n b c list[2] row[5]

How can I modify my code to give me such data output? Thanks!

Row 1 to 5 is in list 1
Row 6 to 10 is in list 2

if you change the list after every 5 rows them try somthing like this.

In basic shell

#!/usr/bin/sh
row=1
list=1
IFS=";"
while read a b c d; do
echo "$a $b $c $d list[$list] row[$row]"
row=`expr $row + 1`
list=`expr $list + 1`
if [ $row -eq 6 ]
then
row=1
fi
if [ $list -eq 6 ]
then
list=1
fi

done<datafile

OOPS - The codes not quite right.

#!/usr/bin/sh
row=1
list=1
IFS=";"
while read a b c d; do
echo "$a $b $c $d list[$list] row[$row]"
row=`expr $row + 1`
if [ $row -eq 6 ]
then
row=1
list=`$list + 1`
fi
if [ $list -eq 6 ]
then
list=1
fi

awk -F";" -v no=1 ' {  print $1,$2,$3,$4" list[" ( NR%5 != 0 ? no:no++ ) "] row[" ( NR%5 != 0 ? NR%5 : 5 ) "]"} ' file

Andrek, Thanks I change this line to make it works!

list=`$list + 1` to list=`expr $list + 1`

and I add

done<datafile

Many thanks!

#!/usr/bin/sh
row=1
list=1
IFS=";"
while read a b c d; do
echo "$a $b $c $d list[$list] row[$row]"
row=`expr $row + 1`
if [ $row -eq 6 ]
then
row=1
list=`$list + 1`
fi
if [ $list -eq 6 ]
then
list=1
fi

_______________________________________________________________
Anbu23, Thanks for the help!

Code:
awk -F";" -v no=1 ' { print $1,$2,$3,$4" list[" ( NR%5 != 0 ? no:no++ ) "] row[" ( NR%5 != 0 ? NR%5 : 5 ) "]"} ' file

I tried the awk too to see if it works. I did not work!