Where you'd use a .
to create namespacing in the template, you use :
in the command-line argument. So for your specific example, you'd invoke
pandoc --variable values:amount="$(shell awk 'NR>1{print $0}' myfile.csv | wc -l)" dummy.md -o final.pdf