There are a couple of flaws in your script, I'll try to highlight some of them:
First:
> set a to "Macintosh HD:Users:User:Movies:Test"
Don't use 'a' as a variable name. It really confuses things on the line:
> if files inside of a folder of folder a exists then
is 'a folder' referring to the variable a as a folder, or is it referring to 'some/one/any' folder as we might use in conversation "I'd like a cookie, please'... you don't generally care which cookie, any of them will do.
Similarly, on the same line you're referring to 'folder a' which I assume is referring to the variable, but since my mind is already messed up based on the previous sentence, I'm not sure. Solution: use more descriptive variable names.
Given the above, I think the line:
if files inside of a folder of folder a exists then
means 'if there are any files inside ((any non-specific folder) of the designated folder)...'
If that's the case, I'd go for something like:
set folderPath to (path to movies folder as text) & "Test:"
tell application "Finder"
set subFolderCount to count folders of folder folderPath
if subFolderCount > 0 then
set subFileCount to count files of folder 1 of folder folderPath
if subFileCount > 0 then
mount volume "nfs://10.0.1.50/disk1"
else
eject disk "disk1"
end if
end if
end tell
It's a lot wordier than it could but, but the logic is simple to follow and easy to amend.