@LINKS[filename] : Returns the number of hard links for the specified file (NTFS only).

 

@LINKS may not work for remote files (depending on your network redirector and the type of server you are querying).

 

See also MKLNK.

 

Example:

 

echo %@links[c:\windows\explorer.exe]

2