The fluid drive in an auto transmission has a finite limit for the RPM. It's a physical thing, because of the way the transmission fluid works in narrow gaps. We actually measure this as the "stall speed". On my Nav (YD25) it's around 2700rpm. This is the point where the engine RPM peaks while the vehicle is in Drive with the foot brake on.
In other words, you can test it:
1) Start the car (outside, not in a garage) and let the engine warm up
2) Put your foot on the brake as firmly as possible
3) Put the gearbox into Drive
4) Press the accelerator to the floor and watch the RPM.
The RPM that your engine gets to is limited by the torque converter and SHOULD be somewhere between 2200-2500rpm (petrol) or 2800-3200rpm (diesel) for your model, but may go a little higher (there's a tolerance that's ok).
If it DOES go much higher, your torque converter isn't functioning properly. This might just be bad oil - but it could be the torque converter not working properly any more.