Anyone sent by Allah swt is a Messenger (total = 144000) see Quran 36:14 اذ ارسلنا اليهم اثنين فكذبوهما فعززنا بثالث فقالوا انا اليكم مرسلون.
Some Messengers are chosen as Prophets and are given Book and Wisdom (total 313) see Quran 3:81. واذ اخذ الله ميثق النبين لما ءاتيتكم من كتب وحكمه ثم جاءكم رسول مصدق لما معكم لتومنن به ولتنصرنه قال ءاقررتم واخذتم علي ذلكم اصري قالوا اقررنا قال فاشهدوا وانا معكم من الشهدين
The Messenger in 3:81 will come after all of them and they must believe in him and support him. My current belief is that that Messenger is Imam Al-Mehdi (as) and only the Prophets who were raised by Allah or killed/poisoned will return to pray behind Imam Al-Zamaan (as) including our own Prophet Muhammed (pbuh+f) who is the 313th and last Prophet but not last Messenger.
Allah swt calls him in Quran 7:157 "Al-Rasool Al-Nabi" not vise versa. ٧_١٥٧ الذين يتبعون الرسول النبي الامي الذي يجدونه مكتوبا عندهم في التوريه والانجيل يامرهم بالمعروف وينهيهم عن المنكر ويحل لهم الطيبت ويحرم عليهم الخبيث ويضع عنهم اصرهم والاغلل التي كانت عليهم فالذين ءامنوا به وعزروه ونصروه واتبعوا النور الذي انزل معه اوليك هم المفلحون
Rasool = Messenger Nabi = Prophet Rasool Nabi = Prophet Messenger (in English adjective comes before noun unlike Arabic).
Finally why 144000 Messengers not 124000 because 144000 - 313 = prime (وتر) and 313 is prime too. See Quran 89:3 والشفع والوتر
Please see why والشفع والوتر are Composites and Primes according to surat Al-Fatiha and NOT Evens and Odds at www.heliwave.com/Primalogy.pdf
Ali Adams
God > infinity