Fairly sure the red blocks are for moderators. I imagine some people (like Tony) are red everywhere, and some people (like project leads for Plan Z: Pheonix City) are only mods in one area, so only red there. I'm color-blind, so I've never noticed green ones.
As for how many? It seems to me to be related to the rank under your name. Underlings get one, minions get two, lieutenants get three, bosses get four, elite-bosses get five. Not 100% on that.