In most scenario (assuming good demand for the stock you are buying and a functional market etc.,) a market maker, looking at their order book, buys 7 items from A. They sit on it until they are able to dispose off them to a buyer. In effect, you, as a buyer is buying a stock from market maker.
Most of the equity market is not P2P but mediated by market maker. They take the liquidity risk (i.e., holding a bad stock if demand plummets) and are rewarded for that by making money off of every transaction through bid-ask spread.
Of course I'm greatly simplifying as an equity order goes through a bunch of intermediaries but Market Maker play a central role here.
What this means is that the shares eligible to transact do so immediately, and the remaining shares sit on the order book and wait for someone to be willing to trade at that price.
There is a specific option that you can set (usually called "all or none") that will prohibit partially filling an order and only allow it to execute in entirety.