The number of stars on the flag is fixed at 12 and is not related to the number of member states of the EU since it is originally the flag of the Council of Europe and does not have a relationship with the EU.
Despite arguments from multiple EU nations, Twelve was eventually adopted as a number because it had no political connotations and was a symbol of perfection and completeness because of the ubiquity of the number for groups in European cultures and traditions.