Count returns the number of sprites in a collection, and this includes deleted ones (the sprites are identified by index for speed, and indices must remain constant). Not great for the public API, but this can't change for backwards compatiblity reasons.
In any case, you will need to find the first .Valid sprite. In the event you're picking a random sprite from the collection, modify the loop while until you find the first .Valid one.