Your code is confusing. You use 'count1' and 'count2' to increment the respective values in the hand, and then later you test only 'count2' and 'suitcount' which is zeroed out.

Of course...