function ParamCount: Integer;
ParamCount returns the number of command-line arguments given to the program. ParamCount returns 0 if no arguments have been given to the program; the name of the program as an implicit argument is not counted.
ParamCount is a Borland Pascal extension.
program ParamCountDemo;
var
i: Integer;
begin
WriteLn ('You have invoked this program with ',
ParamCount, ' arguments.');
WriteLn ('These are:');
for i := 1 to ParamCount do
WriteLn (ParamStr (i))
end.