The bonus stars from achieving a specific rank are as follows:
Notice the important bits here: the real number of stars is based on your MMR, not the actual rank you achieved (the rank gives you a minimum, in case your MMR was lower for some reason). Lats month I reached mid-gold level because I was bored with the Meta, yet received 7 stars because I normally rank mid-Platinum, thus my MMR is much better than “gold 5”