The utility Coconut Battery will give you both the cycle count and the battery charge % vs. the original design capacity. Obviously the lower the cycle count and the higher the battery percentage the better. I'd only buy something whose battery % in the 90s or, at worst, very high 80s. 800 count is awfully high, too.
That 3-4 hours you want will soon become vanishingly small — and you'll get tired of having to plug the laptop in frequently!
Highly recommend not buying any used or non-Apple refurbished Mac unless you have that information — or, as often happens, the seller has put a new battery and offers documentation of that.
Keep in mind that an older laptop will likely not run recent Mac OSs and might not have received security updates, so Internet browsing could be risky!
Those older laptops may well run into issues, flaky ports, battery swelling, keyboard malfunction, or even stop working altogether!
How much are you looking at spending? There are amazing deals on NEW Apple Silicon Macs that will easily get far more than 8-10 hours, last a lot longer, and have a warranty, too.
Good luck!