Camera files are a mess when it comes to case. One device writes IMG_0412.JPG, an app exports holiday.jpg, and an iPhone like my iPhone 17 hands out .HEIC files. find -name '*.jpg' only catches the lowercase ones and quietly skips the rest.
The fix is one letter:
find /mnt/user/photos -iname '*.jpg'
-iname works like -name, but the match ignores case, so *.jpg matches .jpg, .JPG and even .Jpg. Combine a few of them with -o and you can grab every photo type at once. The parentheses need a backslash so the shell leaves them alone:
find /mnt/user/photos -type f \( -iname '*.jpg' -o -iname '*.jpeg' -o -iname '*.heic' \) | wc -l
That counts every JPEG and HEIC file in the folder, whatever case the camera picked. Without the parentheses, -type f only applies to the first test, which is one of those find surprises you only make once.
The caveat: -iname only looks at the file name itself, not the folders above it. If you want to match on a part of the path in any case, there’s -ipath, and -iregex for a regular expression. And quote the pattern, always. Without quotes, the shell may expand *.jpg into the files in your current folder before find even starts, and then you’re searching for something else entirely.
Further reading: find(1) manual page