pulseIn() very sensitive

I'm using two flow meters in a radiant heat system. I measure them on adjacent pins D7 and D8. If I have an input on one and the other is floating, they both count. Surprisingly, the floating pin counts very close to the one with the input. A pull-up resistor of about 7K on each of them solved the problem.

Hardware is a Pro Mini on a breadboard. The flow meter has a clean Hall Effect output.

Just for info.

A floating pin is (almost) indefinitely sensitive. You should never read a floating pin, the result can be anything.

Well, there is just one use for a floating pin, and that is to use the value as a start for a random generator.

You could have just used pinMode(pinWhatever, INPUT_PULLUP); to achieve the same ends.

I would recommend you to have ALL UNUSED pins set to input with their pull-ups enabled for a project.