Comparing numbers should be easy. This is something that every SDK or low-level library supports out of the box. Fortunately, Qiskit is no exception.
Of course, it provides a function to compare integer numbers encoded in Qiskit. So we don't have to reinvent the wheel.
Unfortunately, the official documentation doesn't tell us anything about how to use this function. It only tells us what it does mathematically.
If you want to use it, you have to reverse engineer it. You need to look into the inner code. Or you can read this post