If you're less than 24 hours on the ground, it could count as a layover. You would still, of course, have to get a ticket that was reasonably cheap. Online, that usually involves the multi-destination option, and that's not great for finding the cheapest fares.