for(int i=3; i<=count; i++)
i is equal to 3 and it will only run until i is less than or equal to 5(the value of count). That is why it only runs twice. If your intending on it running 5 times you need to use a loop like so

int i, count = 5;

for(i = 0; i < count; i++)
// loop runs 5 times from 0 to 4 other code is ran here