Data is normally adjusted for splits/reverse splits, etc. The current shares outstanding is usually available. Is there a data repository that captures the shares outstanding for any point in the past?
That information is available in the SEC's EDGAR database, though there can be many flavors of "shares outstanding". It is reported quarterly in a company's 10-Q/K, sometimes on a weighted-average basis. If you don't want to get it manually, a service like Bloomberg will let you access the historical levels quite easily, or you can parse the EDGAR XML feeds.
You should note that the "current" number you refer to is just the most recent quarterly number -- the data isn't available with finer granularity.
If you need to reconcile splits, one (free) option is to use a service like Yahoo Finance -- their "Adjusted Close" normalizes historical prices for dividends and splits. You could back out the dividend impact and use the ratio of "Close" to your new "dividend-excluding Adjusted Close" to get the necessary scaling factor. Alternatively, you can download a table of just dividend/split information and parse it to get the required factors for splits only. To get that table, choose the misleadingly-named "Dividends Only" option.