Make sure all benchmark tests run

Previously the `benchmark_test` program executed the benchmark tests to make sure
the API was working but was not checking the number of tests that were
completed. If the regular expression matching breaks, zero tests could be ran.
Similarly, if one of the APIs breaks and doesn't run the correct amount of tests
then `make test` will catch this.
I've modified this so that the number of expected tests is passed on the command line, the program will work exactly the same as before if no integer is passed.