It counts the main exercise portion of the workout. The cool down and warm up still burn some calories, but not as many as the main part, so I would consider those minutes to be a "bonus".
Hope that helps,
"You may have a fresh start any moment you choose, for this thing that we call "failure" is not the falling down but the staying down." Mary Pickford