Added ability to define the amount of teams generated in the config.

The amount of teams should not be higher than the count of the teams
table, or else there will be an infinite loop. Will add a check later.