As Hardik states 5,000 items is the maximum number of items you can sync on a team site document library. This is a limitation of the sync tool.
Typical workarounds involve splitting out your files and folders in to separate document libraries, almost treating a document library like a root level folder. This will help to keep the numbers of files and folders down.
Furthermore, you may not need to sync all the files. Perhaps only current project files are necessary for syncing so ensure that library is below the sync limit, whereas your static infrequently used files can be placed in a library over the 5,000 limit and just access the files online or through Windows File Explorer.
Windows File Explorer is not impacted by the sync limit. Here's how to use it with document libraries: https://support.office.com
Its also possible to map your document libraries to network drives so it feels like you are working with a local file server. See http://support.microsoft.com/en-us/kb/2616712, or if you would like to make those mappings permanent try a drive mapping tool like Zee Drive (disclosure; its a commercial tool my company develops).
Microsoft announced they have a next gen sync client due for release end of 2015. Whilst it has been confirmed this will remove the 20,000 item sync limit for your personal OneDrive for Business, it has yet to be confirmed if that will also remove the 5,000 item sync limit for team site libraries. If it does, then the sync limit should hopefully be a thing of the past.