Change wave count calculation