A statistical analysis of the occurrence of upstream waves in the foreshock region