Here we need to think in terms of collision domain separator for each of the cases..
A) Switch is a collision domain separator as it uses lookup table..Hence no of collision domains = no of interfaces = x
B) Hub is not a collision domain separator..Hence no of collision domains = 1
C) Router is a collision domain separator as it uses routing table..Hence no of collision domains = no of interfaces = x
D) Repeater is a 2 port device only used to prevent attenuation of signal..Hence no of collision domain = 2(no of interfaces)
E) Bridge is an enhanced form of switch only..Hence no of collision domains = no of interfaces = x
F) Same with gateway also as it is multiprotocol switch..