Count instances of a match in output