Currently, P4Publish does not return the number of the submitted changelist, which may not be the same as the pending change.
The only way to get this data ATM is via scripting or reviewing the console logs.
Having P4Publish return this would provide an easier mechanism.