According to the number of thy cities are thy gods - Among heathen nations every city had its tutelary deity. Judah, far sunk in idolatry, had adopted this custom. The Church of Rome has refined it a little: every city has its tutelary saint, and this saint has a procession and worship peculiar to himself. So here; not much of the old idolatry is lost.
A question of bitter irony. Things are made for some use. Now is the time for thy deities to prove themselves real by being useful. When every city has its special deity, surely among so many there might be found one able to help his worshippers.
O Judah - Hereto the argument had been addressed to Israel: suddenly the prophet charges Judah with the habitual practice of idolatry, and points to the conclusion, that as Jerusalem has been guilty of Samaria‘s sin, it must suffer Samaria‘s punishment.