Edit: It appears I was wrong about rolled treasure... Yes, you only roll once for all the goblins. Doesn't matter if it's one mob or ten, as long as they share the same stat block you only roll once for them. Of course, if there is a significant number of enemies the party will get a bonus to the treasure roll.
True. though I still might roll for separate mobs, not sure yet. I mean, if there's one mob in 'room 1', and another mob in 'room 2', it makes sense that each mob gets a treasure roll.
It's really your call. You can decide what exactly "the encounter" means. The groups in room 1 and 2 might be two separate encounters or part of one larger encounter.