When i decide the niche that i want to create a site about and start to optimize that site how should i optimize my main page and the other pages that i want to optimize. I mean the the main page for how many keywords to be optimize only one or two. The page and etc.
Very broad question my friend. It could be summed up in two categories: linking and content. For starters, consider a lot of content specific to your niche. Personally, one of my key phrases is "kennewick real estate." So I have written content (original, I might add) for "kennewick," for "real estate," and then for "kennewick real estate."
I mean how the structure of a site should be optimize. The main page for the main keyword The second level page for second most searched keyword. etc
When doing SEO, you can only optimize a small number of keywords per page. If you try overdoing it, the additional keywords will water down the weight other keywords. The keywords you are optimizing have to do with the content of the page that you are working on. Say if you are a realtor and you want to optimize "sell home" and "buy home". I'd optimize "sell home" on a page that has more info on selling homes and related services; and "buy home" on a page that has more info on buying homes. Never jam a bunch of unrelated keywords on a single page. That never works.
Right on! I've learned to optimize for three words per page. I've also learned to keep the density down to about 3-5%. It's funny, but in my website the earlier articles were optimized wrong, whereas the recent ones are optimized right (or close).
There are tools out there that will measure the keyword density. I've used this one: http://www.ranks.nl/tools/spider.html often. There are others that maybe someone can recommend. I've started trying to make the keyword density more of a natural thing.