I have had this exact same problem. I can't pinpoint what exactly causes it (am thinking it is losing connection when saving an edit, but nothing happens where I am sure that is the cuase), but I experience what all the other users said (differing total number of features, error thrown when sorting, not all features drawing). Compress, compact, nothing I tried worked. A workaround I have found similar to some other users is to bring the data into QGIS. If you look at the attribute table it will say, for example, 720 features, 716 filtered. If you export to shapefile, you will end up with 716 features, with the corrupt records removed. You can then either create a new fgdb feature class in your schema, and append the shapefiles back in (being mindful of the truncated field names not mapping automatically), or if you have a unique ID, do some sort of join to get your features back. While I understand any data can get corrupted, I concur with others that I haven't seen this behavior in SDE or shapefiles, so I feel like there is the potential for some sort of fix or recovery tool in the ESRI environment, or at least some sort of tool that would tell you what the error was.