Is there a Parasoft API that can retrieve or obtain the number of Testcases, dynamically, given the tst file.
No, there is not. What would you like to do with that information?
SOAtest Server has a REST API that can query various things, including children of test suites. High level, you could write a script to query a tst file hosted on a SOAtest server, counting the children that are returned in the response.About the REST API