22 beaches declared safe for swimming, but study finds 6 to have ‘critical levels’ of E.coli