where did you put the mod(%)?
I would think putting them in your for-loops would do it:
for (int final1 = 0; final1 < (count1%5); final1 ++)
{
System.out.print("*");
}
depending on if you want a "*" for anything below or above 5, you would need either < or <=