The little tag with a number shows you the current level of your building. When this tag has a brownish color, it means that you are currently not able to upgrade further, because you are missing certain requirements. The tag will have a green color as soon as an upgrade is possible.