How many taxicabs are there in New York City? There is some unknown number $x$ which represents the amount of taxicabs in New York City. These taxicabs are randomly distributed throughout the city, so you are equally likely to find any of them.

Assume that the taxicabs were numbered sequentially as they were made, so the set of taxicab numbers is $\{1, 2, 3, \ldots, x\}$

While walking down the street, you see a taxicab with the number $n$. You deduce the following (call event $N$ seeing the taxicab with number $n$):

$$Pr(N \ |\ x &lt; n) = 0$$
$$Pr(N \ |\ x = n) = \frac{1}{n}$$
$$Pr(N \ |\ x = n+1) = \frac{1}{n+1}$$
$$Pr(N \ |\ x = n+2) = \frac{1}{n+2}$$
$$\vdots$$

Since $n \geq 1$, you conclude that the most likely option is that $x = n$, and thus conclude that there are $n$ taxicabs in New York City.

I have two questions.

What is this logic called? It's not called probability matching, but there's some term for this idea of choosing the "highest probability" that's escaping me.

Is this logic fallacious? Is the above argument enough to believe that "most likely" there are $n$ taxicabs in New York City? If not, can someone explain why this is wrong?
This is an application of the so-called likelihood principle, called the maximum likelihood method. That is, if the distribution $P_x(Y=y)$ of an observable random variable $Y$ depends on an unknown parameter $x$, then $P_x(Y=y)$ is taken to be the "likelihood" of $x$ given an observation $Y=y$. As a function of $x$, $P_x(Y=y)$ is called the "likelihood function".  (Note the term "likelihood", not "probability", since this principle does not assign a probability distribution to a fixed parameter.) 

This is what the Bayesian mathematical statistician Jimmie Savage called "attempting to prepare the Bayesian omelette without breaking the Bayesian eggs". That is, a Bayesian would assign a prior distribution to the unknown fixed parameter, and would make inferences about it based on the resulting posterior distribution:
$$P(X=x|Y=n) \propto  P(Y=n|X=x)\cdot P(X=x),
$$

which basically reduces to the likelihood function if the prior $P(X=x)$ is a uniform distribution.
This is equivalent to the German tank problem which faced mathematician in world war II. i.e. how many tanks does Germany have? which it's well documented.  The other thing I would suggest looking into are Fermi Aproximations. He used this to famously answer "how many piano tuners are there in Chicago", it uses a different probalistic approach.