On-the-fly Synthesis for LTL over Finite Traces: An Efficient Approach that Counts