The fact that nobody guesses right away indicates that all have red hats. Since everyone can see at least one red hat (all hands are raised), there must be at least 2 red hats. Suppose there were 2R, 1G. Whoever saw a red and a green would know theirs was red and say so. Since everyone sees two reds there can be no guess based on that scenario, so 2R 1G is not possible. Therefore all hats must be red.