This is *NOT* an undocumented feature:
hcidbdump {-r|-e} [-U userid] [-l] [-L] [-v] [-D] [-f source_system]
[-o owner_system] [-d dest_system] [-t type] [-s state]
[-S time] [-E time] [-M map] [-O time] [-b] [-a] [-F]
[-m mid] [Output_file]
This is the Output_file option. It is a count of the number of messages dumped into the Output_file. I suppose you could use it as a count of the number of messages. But, be aware you have created a file which may be rather large if a lot of messages or zero-length if no messages.