You can do that with a little scripting. Save the script below into a file, e.g. folders_with_filecount.js, then reference it in the scripting tab:

The Parm field is used to enter the specific number of files that a folder must contain.
var objFSO = new ActiveXObject( "Scripting.FileSystemObject" );
var nCountFiles = parseInt(SearchParms.FilenameCustomParm);
function isValidFileName( strPath, strFileName )
{
// Count the number of files in the given folder
// and check it against the user value.
var bIsValid = false;
try
{
var strFolderPath = strPath + strFileName
if ( objFSO.FolderExists( strFolderPath ) )
{
var folderCheck = objFSO.GetFolder( strFolderPath );
bIsValid = (folderCheck.Files.Count == nCountFiles);
}
}
catch( e ) {}
return bIsValid;
}
Note: To make the search faster use the Folders Only drop down option in the Main tab.
You could also search for folders that contain specific files by simply listing them in the file name field and then using the Report Tab to only show the unique folders, e.g.
File name: filename1.dat;filename2.dat;filename3.dat
Or by saving them to a text file and loading them in, e.g.
File name: =C:\MySavedFilenameList.txt