Once you created a clan or the season ended, a series of qualification battles starts. Every battle of every clanmate is counted, i.e. one battle with 6 clanmates will count as 6 challenge battles. The number of qualification battles your clan should pass depends on the rank your clan claimed for the previous season.
Challenge battles to enter a new rank work the same way.