By Rice's theorem, whether an input TM has some semantic property is undecidable if that semantic property is non-trivial. A semantic property is one that describes the language accepted by the TM. A semantic property is non-trivial if it is true of some TMs but not all of them.
Whether a TM has infinitely many states is not a semantic property of TMs. It is a question about the structure of the TM rather than the language the TM accepts. As such, Rice's theorem does not apply.
Indeed, a Turing machine, by definition, has only finitely many states. Therefore, this is a trivial syntactical property: all TMs have a finite number of states. A decider for the language of TMs with a finite number of states simply transitions to halt_accept.
Now, one can imagine a TM-like thing that has infinitely many states and can have infinitely large input on its tape and then asking whether another one of these things can decide whether these sorts of things have finitely or infinitely many states. If you're interested in pursuing this line of thought you probably need to think through what it means for a TM with infinitely many states to decide a problem with infinitely large inputs. Hypercomputation is a term used to describe sorts of machines that work this way. But these are not TMs.