Depends on the barn and especially depends on if you still need instruction on tacking up and untacking the horse. If you can walk in, groom and tack up on your own, while the instructor finishes another lesson for instance, then it would not be included in the lesson time. If the instructor is still teaching you how to groom and tack up, then it would be included.
Warm up and cool down periods would probably be included because you're still riding and subject to instruction, I'd think. At least until you're good enough the instructor can actually leave the area and go start with another student.
If you're taking a lesson on your own horse, you might spend extra time riding and not being instructed, but if you're on a lesson barn horse, then the entire time you're on the horse would be counted as lesson time.