A nice solution is to simply put each icon/task of the same application side by side, so for instance you get 3 firefox icons in a row in the taskbar/dock, that's what I do, there's enough space anyway. That way you can quickly tell what's open and switch to them.