added ability to check total message count (useful for ordering mock)
fixed order mock endpoint reference.
code tidyup