Generally speaking, with a standard investment account (no margins or the like), every dollar you have is every dollar you can afford.
One share = the stock price of the company. If a company's stock price is currently at $50, and you have $5,000, you can buy 100 shares, less any commissions fees.
Amazon (AMZN) is currently at $324.57 as of the time I made this comment, so assuming it's $320 (for evenness), with $5,000, you can only afford 15 shares. You cannot buy fractions of a share.
Once you owned about $7B worth of it you would have to fill out a form telling the SEC about it. I hate forms so that's why I haven't done that.
as many as are available and you can afford
Let's say I wanted to buy amazon stock (not that I would; but I don't want to tell you what I want to invest in) how many shares can I buy?
I'm still reading books on the stock market btw.