exec_list: add a function to count the size of a list
exec_list: make various places use the new get_size() method

Instead of hand-rolling it.
nir: initial import

XXX split me up