Support option counting via count(optname)

This can be useful to check how many times option was specified i.e. -vvv for
very verbose output.