The "contentstore" is where all course assets are stored. It's really a wrapper of code around a GridFS (MongoDB) backend and it stores binary files which can PDFs, WAVs, JPGs, or other. The contentstore code is mainly here:
https://github.com/edx/edx-platform/commontree/libmaster/xmodulecms/xmoduledjangoapps/contentstore
The contentstore has some known technical problems, explained somewhat in this presentation:
http://doctoryes.github.io/mug_talk_modulestore/#1
An effort to move all course assets out of GridFS and into external storage was begun in 2014 and abandoned. The docs from that effort: GridFS Replacement
Since that effort, the performance team has implemented an optimization for non-locked course assets. See Dave Ormsbee or Toby Lawrence (Deactivated) for further details.
Counting Assets in Each Course
...