You can send the value from your form directly to an array:
<Form action="form.php" method="GET">
<INPUT name='errorArray[]' type="text">Value 1</input><BR>
<INPUT name='errorArray[]' type="text">Value 2</input><BR>
<INPUT name='errorArray[]' type="text">Value 3</input><BR>
<INPUT type="submit" value="Submit">
</Form>
Then, to get the total numer of the items in '$errorArray', you can do something like:
$count = count($errorArray);