When we purchase shares of a company for a certain sum of money (e.g: 1000 dollars), is this money immediately available to the company as a cash flow? In the balance sheet, will this money show up under 'Income'? I ask this question because while trying to judge the fundamental worth of a company, it is important to find out how much money the company made by selling its product/service. If this 1000 dollars is going towards the income, then that may give a false picture.
First: the question is irrelevant for purchases on exchange, mostly. Majority of sales on stock exchanges is between shareholders.
If however you buy directly from the company (in a IPO, or direct share purchase program of some kind, like ESPP), then it does end up showing in the company account ledgers one way or another. It then become part of company's total assets, and the newly sold shares add to the equity.
Share sales & purchases are accounted only on the balance sheet & cash flow statement although their effects are seen on the income statement.
Remember, the balance sheet is like a snapshot in time of all accrued accounts; it's like looking at a glass of water and noting the level. The cash flow and income statements are like looking at the amount of water, "actually" and "imaginary" respectively, pumped in and out of the glass.
So, when a corporation starts, it sells shares to whomever. The amount of cash received is accounted for in the investing section of the cash flow statement under the subheading "issuance (retirement) of stock" or the like, so when shares are sold, it is "issuance"; when a company buys back their shares, it's called "retirement", as cash inflows and outflows respectively.
If you had a balance sheet before the shares were sold, you'd see under the "equity" heading a subheading common stock with a nominal (irrelevant) par value (this is usually something obnoxiously low like $0.01 per share used for ease of counting the shares from the Dollar amount in the account) under the subaccount almost always called "common stock". If you looked at the balance sheet after the sale, you'd see the number of shares in a note to the side.
When shares trade publicly, the corporation usually has very little to do with it unless if they are selling or buying new shares under whatever label such as IPO, secondary offering, share repurchase, etc, but the corporation's volume from such activity would still be far below the activity of the third parties: shares are trading almost exclusively between third parties.
These share sales and purchases will only be seen on the income statement under earnings per share (EPS), as EPS will rise and fall with stock repurchases and sales assuming income is held constant. While not technically part of the income statement but printed with it, the "basic weighted average" and "diluted weighted average" number of shares are also printed which are the weighted average over the reporting period of shares actually issued and expected if all promises to issue shares with employee stock options, grants, convertibles were made kept.
The income statement is the accrual accounts of the operations of the company. It has little detail on investing (depreciation & appreciation) or financing (interest expenses & preferred dividends).