much faster to do counts in a lookup