SQL COUNT - some correct values, some wrong values