Refactoring again (2): Got rid of temporary variables using inject on the loops of both exact and number match count methods