Machens is currently the east terminus of the Katy trail. I believe that the reason Machens is mile 27 is that there is intent to expand the trail further east, thereby making the "new" eastern-most terminus mile number 1. Edit: the new terminus would be at the Missouri/Mississippi river confluence.
I believe number 27 marks Trailhead No. 27 Just trying to remember how many official trailheads there is ? But I am quite sure it was 26 or 27 plus some refurbished train depots. Have you try RideWithGPS app it is really easy to build your daily plan.
I couldn't figure out the mile markers either, but the bike trail definitely ends there and mile markers count UP as you head west. Maybe an artifact of the old railroad? It was 13 miles from Machens to Main Street in St. Charles. That's the only stretch I got to ride (round trip from St. Charles)
Thanks! Your answer is awaiting moderation.