Function added to return count of commands mapped to message.
Added function to get message type that executed command.