On https://commons.wikimedia.org/w/index.php?search=File%3A&title=Special%3ASearch&fulltext=1, "Results 1 - 20 of 23,135,741" is shown, though the 20 results that are supposed to be on the page are not there.
It turns out that SpecialSearch does the following check:
$filePrefix = $wgContLang->getFormattedNsText( NS_FILE ) . ':';
if ( trim( $term ) === '' || $filePrefix === trim( $term ) ) {
// Empty query -- straight view of search form
return;
}The $filePrefix part of this was added in https://www.mediawiki.org/wiki/Special:Code/MediaWiki/44252, though it's unclear why. However, it is not present in the SearchEngine classes, and SpecialSearch performs the "search" even when it is not going to show the results.