How do I limit the number of ticket to be sold in events
You can use price sets to track purchased tickets instead of just registrants.

See this reference (down the page to 'complex event fees with price sets'

http://book.civicrm.org/user/current/events/creating-an-event/