Yes, they count.
Just who made me judge? Divine decree.
What I say goes.
A spin instructor told me that since you do not coast on a trainer, at least for very long, you actually get to double your mileage for record-keeping purposes.
However, I've never found that a trainer simulates hill climbing very well, which is my downfall.
But it surely it is better than watching recordings of Dancing with the Stars.