> Is there a specific reason retailers don't include the inventory on an item when you are checking out?
Some (e.g., Amazon) do indicate low-inventory warnings, including "Only n left".
> Clearly they have the counts available on the items if they know when they are sold out.
Inventory inaccuracies are not unheard of. Its quite conceivable that you don't know you've sold the last one that you will be able to deliver until you try to sell the next one, go to pick and deliver it, and find its not in deliverable condition (e.g., because it got damaged in the process of getting it ready for delivery), even with an otherwise-accurate inventory. Its also possible that you are expecting deliveries within the delivery window for a given order priority (or that you have a JIT ordering process and that your ordering time from your supplier has a turnaround within the delivery window for your normal delivery priority), so that you actually aren't concerned with your inventory, but your suppliers inventory.
Logistics is complicated. Having enough information to give low-inventory warnings for specific products, with specific counts for low-inventory items, is tractable for some retailers, but not others.
Additionally, the practice of doing so implies that there is little risk of supply running out for other products, so while it may motivate decisions on the products that have the warnings, a retailer being known to provide the warnings may have the opposite effect on sales of products that don't have the warnings. So it may not always be a win to do it.