When I create pages in Pages library, I get an error saying 'The page name already exists' or 'its checked out for editing by another user'. But when I go to Pages library and try to find that page, it may not be there. It will only be visible from that user's login which is displayed in the error page. Once that user checks-in the page, then everyone can find that page in the Pages library and can start editing it. This happens because there is no checked in version of the page, the user might have created it and left it without checking in. If I go into View All Site Content and it shows 10 documents. When you actually go to the Library All Items view (No filtering), I can only find 2 documents. How to fix this issue?
Normally what happens here is, there are documents in the library that were uploaded for the first time and never checked in. So only the owner of the files can see them no matter the view or permissions you have. Go to the Document Library Settings page of the respective Pages library. Under the Permissions and Management group, there is a link named Manage files which have no checked in version. When you click the link it will show all Checkedout files.
this is an old post, however I have recently discovered another cause of this issue. When you have a library with a lookup column to another list or library that is set to "enforce relationship", this also can cause the issue of altered count: when you delete a file in the library, SharePoint is not any more able to subtract this from the total count of items in the same library. This is a real bug, there is not other way than delete and recreate the library without the lookup enforcement... even if you try to deactivate this enforcement in the specific lookup column, the issue persists... Hope this help someone else, just in case please mark this as a correct answer