now the count function can work in ie7