lib/types: use unsigned int for interface, dns and prio counts