Whether or not you use the article a depends on what exactly you want to say. But, only finite number is not correct. I took a peek at a few of the only finite number posts from your link, and every one I looked at (which was not anywhere close to all of them, mind) should have been a finite number. The fact that the search which includes a is ten times more common than the one without hints that a finite number is correct.
If you want to say something along the lines of the available or eligible amount or quantity of X is limited or has an upper bound, then use only a finite number of X. This phrase means, essentially, a limited quantity of something and is by far the most commonly used version of this construction.
If you want to say something along the lines of there are only so many groups or categories of Y or unbounded or infinite Y values are not eligible for consideration, then use only finite numbers of Y. Note that numbers is plural. This phrase is quite uncommon. If you're unsure which to use, it's more likely that a finite number is correct.
There's only a finite number of options.
Only a finite number of equations model the data.
There are only finite numbers of animals belonging to endangered species alive today.
The function produces only finite numbers; infinite values are never returned.