It's unlikely that they're trawling your uploaded content. Dropbox does some amount of preprocessing (e.g., to allow document preview and photo thumbnails), which also collects information like MIME type. I would assume they simply ran an aggregate query against this sort of metadata, or collected these stats at the time of upload.
So they're reading the files in Dropbox and its contents to know they're Office documents?