Usually a dance class commences in a calm manner,  likewise the music should also. As  the musician watches the teacher `marking through` an exercise it`s important at this stage to determine if the underlying rhythm is a 2 or a 3, (regardless  of  the  movement phrasing which thus determines the overall musical phrasing). The smallest division of beats break down to either 2`s  or 3`s  or combinations thereof  (I only ever count in  very fast 1`s occasionally playing Eastern European music). There you have your underlying rhythm for the exercise.

Now give attention to the phrasing. Watching the dancers `mark through` an exercise while listening to the  teacher, helps an accompanist grasp the phrasing,  feel and atmosphere of the music.  It`s always worth watching the movement (just in case you get lost, which happens sometimes in long phrases), so you will know when the exercise has finished. Ideally, an accompanist  plans how many musical phrases one has to work within  to help create a rounded piece of music. Quite often, an exercise will repeat as  dancers take the movement to  the opposite side or  different positions and it is a good idea to develop the music slightly with each repeat.

In a modern/contemporary class, the teacher usually counts in (or down) the exercise (this is called an introduction). It helps when the spoken introduction  is in the correct tempo and rhythm and here, I also feel the general atmosphere for the music from the tone of  the teacher`s  voice. It does not always work out as clearly as one would like so a musician must be ready for subtle tempo changes when the exercise starts.  Like in many situations, it`s important to build a relationship with the people you work with to gain understanding and trust. If something is unclear, just communicate in simple terms until it becomes clear what music is needed. (I will make a list of basic dance terminology that a musician is going to hear in  class later).

Sustained melody and comfortable supportive rhythm is a good basis for approach to music in the warm-up and I would advise nothing too discordant in the harmony either. Providing a clear downbeat is essential, especially for younger dancers or if you are unfamiliar with the teacher. Work within the boundaries of each exercise and make music!