Yeah, I did a five-speed + brifter setup some years back.
I used a NOS Sachs seven-speed freewheel, 'cause the Sachs was just a five-speed body with two smaller cogs cantilever off the end. I unscrewed 'em. I paired this with Shimano seven-speed brifters.
Worked great.
You don't have to 'keep track'. When the derailleur hits its stop, it'll quit shifting gears in that direction.