This method allows one to find numberOfElementsReceived you use in MPI_Recv. If this value is known, there is indeed no point in using MPI_Probe and MPI_Get_count.
But often only numberOfElementsToSend is known. Thus, you first probe for the number of elements received and write it into numberOfElementsReceived (as indicated by the last argument in MPI_Get_count), and only then can you use this variable in MPI_Recv.
Using numberOfElementsToSend in MPI_Recv is strongly not recommended, as it is more likely to lead to bugs.
P.s. probably after 4 years you don't need the answer ahah, but mb someone else can find it useful/)