select idx, count(*) from tmp where kwd in ("heugh", "stook", "tanti") group by idx