Shake counter