If you leave AN0 floating, you'll pick up noise... if you place a pull-down on... TADA, no longer noise, your count should be=0