Introduce "occurences" command, WIP for #156/#125