Fix wildcards that didn't always work in the Makefile

Also, build some stats about how often each relation is used.