There is no specific utility in OpenVMS to do this, but many people use:
$ SEARCH/STATISTICS/OUT=NL: file.xxx XXXXXX
or
$ SORT /STAT file.ext NLA0:
It doesn't matter what string you search for, though it is marginally faster
if the string is not found. You'll get an output which looks like this:
Files searched: 1 Buffered I/O count: 4
Records searched: 94 Direct I/O count: 1
Characters searched: 3024 Page faults: 17
Records matched: 0 Elapsed CPU time: 0 00:00:00.02
Lines printed: 0 Elapsed time: 0 00:00:00.02
The "records searched" tells you the number of records.