You can't develop Apex in your Salesforce production organization. Live users accessing the system while you're developing can destabilize your data or corrupt your application. Instead, you must do all your development work in either a sandbox or a Developer Edition organization.
Any deployment of Apex is limited to 5,000 code units of classes and triggers.