Forms doesn't really store upload files in the input element on the form. The input element is used, but the file is actually uploaded to Forms with a reference guid.
This is a fairly common practice and is helpful for various reasons, like reducing the amount of data required to submit/post the form, or validating/scanning uploaded files prior to submission.
I assume you're using the classic designer since you want to access DOM elements, but if this is in a different version, things are probably quite different.
If you inspect the clickable file name after uploading a file, you'll see a reference URL with the file guid and that is contained in a "files" table which in the same container as the input.
One thing you can do is use the "files" table to get a file count based on the number of child tr elements within the table that have the "file" class.

Here's an example that counts the number of attachments for every "files" table on a form or for a specific upload field.
$('.files').each(function(){
console.log($(this).find('.file').length);
});
console.log($('.myFileUpload .files .file').length);