Finger print sensor.

I have already enroled five finger prints stored in the scanner with ID's 1,2,3,4 and 5.

Completely irrelevant.

In my program i can declare an array to hold a copy of the ID's.

Why is that important? What, EXACTLY, do you get when you scan a fingerprint?

initialise a counter maybe to 0.

int scanCount = 0;

You write the rest.