pseudocode of remaining rooms counts