The number of waves is influenced by the population of the kingdom (as long as there's suitable spaces for them)
But the size of the waves are influenced by attack strength (i.e. number of troops but stronger troops are worth more) and resource production
Edit: There's also a random element so you can't actually figure out exactly what to you're going to get because it will be different each time
Basically though - the bigger and stronger your kingdom is the more camps you'll get.