Changed if statement so it now counts the amount of results