I'm no mathematician, but I don't think that's how it works. A quick Google says there are 100 billion neurons. So you would have 100000000000!
possible combinations, unfathomably large, but finite. Granted, a human brain is more complex than the configuration of neurons, but I don't know how it becomes infinite.
I'm also way past the point of overthinking this.
Now we are getting into the quantum physics question of if the universe is discrete or continuous. Which seems to be unsolved.
So I guess that's my answer. If the universe is discrete then there are finite genders, and if it's continuous then there could be infinite genders.